How to use ... when there is uncertain number of arguments

I just tried to write the following method
public void analyze(int index, Object... flags)
Assume I have passed 5 arguments into the method, how can I manipulate each of them?
Thanks

I just tried to write the following method
public void analyze(int index, Object... flags)
Assume I have passed 5 arguments into the method, how
can I manipulate each of them?
Thanks_flags.length should give you the number of arguments passed to the method. It can be treated as if it were an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Cumulative Percent only displaying when there is a number present

    Hi
    I am using the below cumulative percent formula for a chart and pivot table display (see below code). The problem is that the cumulative percent and cumulative number are only showing up in the pivot table when there is a number to cumulate (see below screenshot).
    While this makes sense logically, I would like to see the value in the prior row appear when there is no value to cumulate so that there is always a value displaying for the user--see second screenshot.
    Does anyone know if there is a way to do this?
    Paul
    Code:
    =(CALCULATE(countrows(s1Perm1),FILTER(ALL(s1Perm1[ExitMonthCategory]),s1Perm1[ExitMonthCategory] <= MAX(s1Perm1[ExitMonthCategory]))))/(CALCULATE(COUNTROWS(s1Perm1),ALL(s1Perm1[Exit],s1Perm1[ExitMonthCategory])))
    Current result:
    Desired Result:

    Hi Greg
    I tried your solution above and it works from the perspective that it can provide the cumulative number and cumulative percent for a column where the values in the column are all present.
    However, the column I am using represents exit months from foster care actually. There are different month values in the column: .5,1,2,3,4,5,6,9,12,15,18,21,24..... With the exception of .5 to 6 months, they are in 3 month intervals. For this particular
    table, I would like to show only those month values that represent 6 month intervals: 6, 12, 18, 24.....
    When I do this, the cumulative number only sums the values for the columns that are present in the table and not all the actual values. This gives a different number and is not correct.
    Is there a way to get the above function to aggregate all values of a column even when not all values are displayed in the pivot table?
    The function I am using is:
    =countrows(s1Perm1)
    Correctly aggregating values for exit months when they are all present:
    When I only display 6 month intervals, only those values present for the column are cumulatively summing. This is not correct:

  • Minimize the count of cubes when there are more number of cubes

    Hi All:
    Need your inputs on reducing the count of cubes when there are more number of cubes in any project.
    On which basis we can downsize the count of cubes? For example,if there 30 cubes in same region,I want to reduce them to ,say 20 cubes.
    Please share your thoughts.
    Regards,
    Upendra.

    You need to evaluate all of your existing cubes and see if there is any overlap in dimensionality that would allow you to combine cubes. Such as if one is actuals and another cube is budget for the same data, possibly you can combine those. Or as someone else suggested based on Business Units (If the other dimensions allow it. Perhaps conflicting Account or other structures won't allow it. )
    However you have to then balance combining cubes against larger cube size which could impact calc time and other performance issues.
    Its all a balancing act.
    Look at where it makes sense to combine them. Only you know your environment enough to state if they can be combined or not.

  • How to use Cross Company Code document  number as Reffrence.

    Hi
    Actually user wants to post the same debit credit line items with Editing the amounts which he has posted last month
    So i suggested him to use post refference of the previous month document number.
    Since that is Cross company document number. There is no source to give  in T.Code FBR2. There is a fecility to give only document number of a company code not cross company code.
    Assume that there are 3 company's involved in that document.
    company  X --- 25 line items
    company  Y -- 75 line items
    Company  Z -- 100 line items
    Since he given in header data X Co code it has generated the Cross company code document number 1000X 08 ( which means 1000 is doc.number X is company code 08 is year. This is sap standard cross company code doc number format)
    and individual document number is
    X - 1000
    Y-  2000
    Y-  3000
    If he post with the reffrence of X company only 25 lines will come remaining 175 line he as to post manually.
    If he take Y Doc number  only 75 lines will come
    If he take Z Doc number  only 100 lines will come
    To bring all lines there is no provision to give Cross company Doc number.
    Please advice how to use cross company doc number as refference.
    Tks
    Shivaji

    Hi guru
    This is answered
    Thanks
    shivaji

  • How to use SNRO to create daily number range?

    Dear all,
    I would like to know how to use SNRO to create a daily number range.
    We would like to have the following sequence. The first 8 digits are date and the last 2 digits are number sequence. Each day, the last 2 digits will start from 01 again. i.e. <8-digits date><2-digit sequence>
    For example, today is 22 May 2006,
    2006052201
    2006052202
    2006052203
    Tomorrow will have sequence like this:
    2006052301
    2006052302
    2006052303
    Thanks!

    Thomas,
    I don't there is a automated way of doing as the dates do NOT follow a numbering sequence. What you can do is to create a number range for getting the last two digits every day and manually concatenate the date with the serial number.
    However, as you have to reset the counter every day that might be a issue.
    Regards,
    Ravi

  • How to use when-validate-item in the form personalization?

    Dear all,
    I want to use when-validate-item trigger in the form personalization on a specific item. while in the same time the when-validate-item is not included in the trigger event list.
    Please advice & Thanks in advance
    Ashraf Ashour

    Use condition. If you are validating a record, just out the desired check in the condition field for that specific item.
    Thanks
    Nagamohan

  • How to use WHEN clause in sqlldr

    I want to insert RECORDS in table which are having orgno column values greater then 100 in my datafile using sqlldr.
    In WHEN clause in my control file if i mention WHEN (orgno > '100')
    it gives me error :
    Illegal combination of non-alphanumeric characters
    WHEN (orgno < '500')
    ^
    I am able to insert records when i use WHEN (orgno = '100') but not when i use > or < sign.
    what to do???

    Hello user8531525.
    "The supported operators are equal (=) and not equal (!= or ne)"; replace the ne with less than and greater than signs. (http://www.mcs.csueastbay.edu/support/oracle/doc/10.2/server.102/b14215/ldr_control_file.htm)
    Your filtering will need to be performed on the file itself or on the records after they are loaded. If your file is local to your database, consider using External Tables.
    Luke
    Please mark the answer as helpful or answered if it is so. If not, provide additional details.
    Always try to provide create table and insert table statements to help the forum members help you better.
    Edited by: Luke Mackey on Aug 5, 2010 2:58 PM

  • How to set what email program Safari uses when there is a link

    When I click a link in a browser window that is supposed to open my email programme it opens Mail.  How do I set Safari to use an other mail programme?

    From the Mac Mail menu bar click Mail / Preferences the select the General tab.
    Click the pop up menu next to:  Default email reader.
    Select your email client.

  • Error message that a version of T-Bird 24 is in use when there is no other. How do I fix?

    I am helping a friend who uses T-Bird on a Windows 7 PC that had a hard drive crash. Installed T-Bird 24 on another PC that works on Vista and it initially worked fine. In attempting to drop files from old to new, after a reboot, I try to open T-Bird and get a message that t could not open as another version of T-bird was in use (nothing visible). After several attempts to delete and re-install, here I am.
    Any help

    You very likely have a lock file.
    http://kb.mozillazine.org/Profile_in_use#Remove_the_profile_lock_file

  • How to identify when there is a break in continuity of an integer

    Hi guys, 
    Can you give me an idea on how to solve the following issue?
    column01       column02       column03       column04      
    1                    001                 002                  0                
    2                    003                 004                  0
    3                    009                 010                  1
    4                    015                 018                  1
    5                    019                 020                  0
    so basically the fourth column (column04) is what I want to get if I am given the three columns. The flag 0 or 1 will be applied in the forth column if column02 is not a follow up number of the previous row's column03 value. 
    example, column04 is o for the second row because column03 os the first row is 2 and column02 of the second row is 3...hence 3 is the next number to 2.
    thanks in advance
    ebro

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI', 'ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We
    need to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI', 'ISO Standard SQL. And you need to read and download the PDF for: 
    https:www.simple-talk.com/books/sql-books/119-sql-code-smells/
    >> Can you give me an idea on how to solve the following issue? <<
    No, we have to only guess. Why did you fail to post DDL? The silly picture of a table you posted has no name, no keys, no constraints. Yet you expect other people to read your mind.  
    Why are you using flags in SQL? That was assembly language.  SQL is based on logic and predicates; we like to detect the actual state of being in the schema. Your ASCII picture shows leading zeros on some of th4e columns, so they have to be strings; sure
    would help if you told us if this guess is right. 
    Here is my first attempt at doing what you shroud have done if you were polite: 
    CREATE TABLE Foobars
    (foobar_seq INTEGER NOT NULL PRIMARY KEY, -- did I guess right?? 
     col_2 CHAR(3) NOT NULL CHECK(col_2 LIKE '[0-9][0-9][0-9]), 
     col_3 CHAR(3) NOT NULL CHECK(col_3 LIKE '[0-9][0-9][0-9]), 
    -- ,stupid_flg INTEGER NOT NULL CHECK(stupid_flg IN (0, 1)) -- drop this column! 
    INSERT INTO Foobars
    VALUES
    (1, '001', '002', 0), 
    (2, '003', '004', 0), 
    (3, '009', '010', 1), 
    (4, '015', '018', 1), 
    (5, '019', '020', 0), 
    >> so basically the fourth column (stupid_flg) is what I want to get if I am given the three columns. The flag 0 or 1 will be applied in the forth column if col_2 is not a follow up number of the previous row's col_3 value. <<
    Does “follow up number” mean that we are supposed to convert the string to a numeric, and look for a successor? Is col_1 actually the key? 
    Did you know that SQL is based on sets? Sets are mathematical structures which have no ordering. This whole exercise is highly suspect. What does the sequenced pair mean in  your data model?  
    SELECT foobar_seq, col_2, col_3 
           CASE WHEN CAST(col_2 AS INTEGER) +1 = CAST(col_3 AS INTEGER)
                THEN 'TRUE' ELSE 'FALSE' END AS stupid_flg
      FROM Foobars;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How data update when there is two planning cubes in one aggregation level

    If we have two planning cubes and a multi-cube includes these two planning cubes.
    then we have the aggregation level defined based on this multi-cube.
    if the characteristics and key figures defined in aggregation level all are included in these two planning cubes. When we plan the data with plan query based on this aggregation level, which plan cube will be updated with plan data, or both of them?

    HI Wang,
    yes as Bindu said you need to restrict the layout based on the infoprovider.
    Lets assume that we have a multi provider M1 and it has two planning cubes cube1 and cube1.
    in case u develop a layout for updating cube 1 give the restriction in the filter section as infoprovider = cube1.
    or the vice versa.
    Else ur layout must input values for both the cubes simultaneously, then in that case create two restricted KF with each having a restriction for cube1 and cube 2.
    so wen the user enters value for the first restricted KF it will get saved in cube1 and wen he enters value for the second  restricted KF it will gets saved in cube2.
    This is how it works. Guess this was useful to u.
    Regards.
    Shafi.

  • Forms: how to use COUNT_RECORD to get the number of record retrieved?

    After GO_BLOCK(BlockName)EXECUTE_QUERY, there must a way to obtain the number of records retrieved.
    I like to use this number to display to number of records on the form.
    Clearly, a not so good way is:
    SELECT COUNT(*) INTO :NUM_RECORD FROM Table_Name;
    It queries table one more time.
    Could any one give a clue?
    Thank you.

    Dear Kiran,
    Fom tables EINE (inforec no, plant) and EINA (inforec no, material, vendor), you can get the desired information.
    Regards,
    Prasanth

  • How to know when there will be something new.

    I have a Powermac G4...and it's ok but kinda slow...not updated. In otherwords I would like a new computer (and an iPod). I'm thinking about a refurbished 20" imac intel core duo. But I don't want to get it and then realize something new just came out the next day. I know It's a method of sales, but it would be nice to know what's next like a new OS, prosessor, computer, ect. One other thing withthat is if there will be a new eMac. That would be tight.
    Power Mac G4   Mac OS X (10.3)   I'm getting a new imac/any newer computer like a new emac

    Hi Delectric! And Welcome To Discussions!
    It really doesn't matter when you buy a product, any product. There will always be something New & Improved, subsequently released!
    As per the Apple Discussions Use Agreement, you will not find posters speculating about future Apple releases/upgrades.
    Quoted:
    "2. Submissions
    -Search or browse for existing answers before you ask a question. Someone else may have asked your question — it may save you some time.
    -Stay on topic. Apple's discussion forums are here to help people use Apple products and technologies more effectively. Unless otherwise noted, don't add Submissions about nontechnical topics, including:
    -That Apple rumor you saw on another website.
    -Discussions of Apple policies or procedures.
    -Speculations/rumors about unannounced products.
    -The status of your 1973 MG Midget restoration.
    ali b

  • When there is a number, safari alway askes if you want to dial.

    which makes it impossible to highlight and copy.

    well, that ***** doesn't it? especially when that number is not a phone number, such as my craiglist posting ID number, which I want to copy and search.
    they really should add a "copy" choice in addtion to call and cancel.
    sannefromeindhoven wrote:
    Hello!!
    If you dial the number and you disconnect directly its in you phone history!! So than you can use it or something!!

  • How to use TreeExpanderWidget, there is no example or specification about this widget, anyone can tell me how to use it thanks.

    Now I have a TreeView, it works fine.  But all the items in the tree are displayed directly, I want they are collapse at start and just expand on click event ,just like the following picture .
    I searched all the SDK ,there is no example about this .
    could any one give some example or tell me how to set this parameters. thanks.

    Usually a tree is created with collapsed nodes. Are you sure that you don't somewhere call ITreeViewMgr::ExpandNode()?
    If your expanded nodes only reflect previous state, the header comment in ITreeViewMgr::ChangeRoot() mentions ClearTree(kTrue) for exactly that case ...
    Dirk

Maybe you are looking for