Comparing a single int to more than one int value?

Hi is there a way to compare a single int value amongst several ints in one go?
i know i could do if statements that can compare each int one by one but i was wondering if there is an easier way? like comparing all values amognst eachother
somthing like
int i;
int a,b,c,d,e,f,,g;
//ints a-g assigned some random numbers
if(i == a,b,c,d,e,f,g)
      //do somthing here
}

i found out a way. i tried this way by using nested for loops and an if statement that compares every single value amongst eachother
for(int q=0; q < 5; q++)
            ran[q] = (int)(java.lang.Math.random()*52);
        for(int x = 0; x < 5;x++)
            for(int z = 0; z < 5; z++)
                if(x != z && ran[x] == ran[z])
                    ran[x] = (int)(java.lang.Math.random()*52);
        }

Similar Messages

  • Can single site have more than one site navigation???? In WPC

    Hi,
    I am new to WPC, my doubt is can a single site contain more than one site navigation ( navigation.wpc) ??
    let me bit more clear....
    I created a site, created navigation nodes, created web pages and then published site navigation, copied the path from navigation.wpc, used that path in a worksets "external connections".
    Up to here every thing is clear and i did what I wanted.
    NOW,
    I want to create a new web page which will be part of above navigation path ( navigation.wpc).
    I create a web page under same site and used that navigation, and when i used this path in new workset, its again showing me previous content added new web page in detailed navigation of portal.
    I want this web page should be part of second level navigation which will not connect to previous one any where.
    at last my question is.... can I have more than one navigation paths under single site?
    Is it possible? if yes, How? give me steps...
    Thanks in Advance...
    PradeeP

    Hi there,
    I had the same problem and I THINK I found a way to fix it, try creating a Site inside another Site, this way:
    1. Create a New site in the "Sites" folder, let's call it "MyMainSite" (Web Content / Sites / MyMainSite).
    2. Open that new site "MyMainSite", there you will find 4 folders, right? Entry Points, Site Content, Site Navigation and Web Pages.
    3. Then click at "New" and choose "Site". Here you're creating a Sub-site inside your MainSite, got it? Name this site as "MySubSite"
    4. You'll find a 5th folder called "MySubSite", open it.
    5. So, you have again the same structure with the 4 folders (Entry Points, Site Content, Site Navigation and Web Pages) and when you create your nodes in the Site Navigation structure you will have a new "navigation.wpc" file, but with a different path.
    Technicly it's not very nice, but it works, right?
    I hope this helps
    Demis Estabridis

  • Function with more than one return value

    Hi
    Please let me know how to write a function with more than one return value and in what scenario should we go for this option.
    Thank you

    user12540019 wrote:
    Please let me know how to write a function with more than one return value and in what scenario should we go for this option.Yes. And the following is the correct approach (using OUT variables is not!) - you deal with the multiple values as a data structure. This example uses an custom (user-defined) SQL data type as the structure.
    SQL> create or replace type TXYcoord is object(
      2          x       number,                  
      3          y       number                   
      4  );                                       
      5  /                                        
    Type created.
    SQL>
    SQL>
    SQL> create or replace function fooCoordinate( someParam number ) return TXYCoord is
      2  begin                                                                         
      3          -- doing some kind of calculation using input parameters              
      4          --  etc..
      5
      6          -- returning the multiple return values as a proper data structure
      7          return(
      8                  TXYcoord( 0, 0 )
      9          );
    10  end;
    11  /
    Function created.
    SQL>
    SQL> -- selecting the data structure
    SQL> select
      2          sysdate,
      3          fooCoordinate(123)      as XY
      4  from       dual;
    SYSDATE             XY(X, Y)
    2010-02-01 08:49:23 TXYCOORD(0, 0)
    SQL>
    SQL> -- selecting the properties/fields of the data structure
    SQL> select
      2          sysdate,
      3          treat( fooCoordinate(123) as TXYcoord).x        as X,
      4          treat( fooCoordinate(123) as TXYcoord).y        as Y
      5  from       dual;
    SYSDATE                      X          Y
    2010-02-01 08:49:23          0          0
    SQL>

  • Sending more than one name value pair via ajaxRequest.add()

    Hi all,
    I'm implementing AJAX in Oracle Application Express to perform DML operations on a table. I need to send more than one name value pair via the ajaxRequest object. Can someone guide me how to achieve this? Say for example i need to send 2 values(need to send 2 form elements when submit button is clicked) P3_region and P3_scope. i tried the following methods.
    Method 1:
    ======
    ajaxRequest.add('P3_region',document.getElementById('P3_region').value);
    ajaxRequest.add('P3_scope',document.getElementById('P3_scope').value);
    Method 2:
    ======
    ajaxRequest.add('P3_region',document.getElementById('P3_region').value,'P3_scope',document.getElementById('P3_scope').value);
    Neither of them is fruitful. Can someone guide me how to achieve this?
    Regards,
    Balaji Radhakrishnan.

    Hi Roel,
    The javascript goes like this.
    <script language="JavaScript" type="text/javascript">
    function getElement1()
    document.getElementById('P3_Element1').value = '';
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=Element1Process',0);
    ajaxRequest.add('P3_Element2',document.getElementById('P3_Element2').value);
    ajaxRequest.add('P3_Element3',document.getElementById('P3_Element3').value);
    ajaxRequest.add('P3_Element4',document.getElementById('P3_Element4').value);
    ajaxRequest.add('P3_Element5',document.getElementById('P3_Element5').value);
    ajaxRequest.add('P3_Element6',document.getElementById('P3_Element6').value);
    ajaxResult = ajaxRequest.get();
    if(ajaxResult)
    var wsArray = ajaxResult.split("~");
    document.getElementById('P3_Element1').value = wsArray[0];
    </script>
    The application Process goes like this..
    declare
    v_Element1 VARCHAR2(60);
    begin
    select distinct Element1 into v_Element1 from TableA where Element2=:P3_Element2 AND Element3=:P3_Element3 AND Element4=:P3_Element4 AND Element5=:P3_Element5 AND Element6=:P3_Element6;
    htp.prn(v_Element1);
    exception
    when others then
    v_Element1 := 'Invalid Header Combination';
    htp.prn(v_Element1);
    end;
    The requirement goes like this..
    When i give Element2, Element3,Element4,Element5,Element6 as input in the form page the Element1 should get displayed automatically without refreshing the page. But when i use the above javascript and application process i get the Element1 loaded with some html scripts. I call the javascript using onChange() function.
    Regards,
    Balaji Radhakrishnan.

  • Making an int() return more than one method?

    hey people. i need an int, for example,
    public int someInt(){
    return 1000;
    }to return more than one number. To clarify, i need to be able to call the int() and it return me three different values. Is this possible?

    BigDaddyLoveHandles wrote:
    Word origins: guru
    Hmmm... "Heavy, weighty"
    Reminds me of a t-shirt my brother has. He's a rather portly gentlemen. The shirt has a picture of Buddha and the caption, "I have the body of a god."

  • How to retrive more than one row value from table

    hi,
      I had create one table if i entered value in more than one row, the second row override the first row value and while printing it in flat file i am getting the second value entered twice.
      i created one context for each column.
        plz provide me a solution..........
           very urgent..........
            Regards,
            Kiruthika

    Hi,
    Create seperate element for each row and then set values.
    for(int i=0;i<4;i++)
    IPrivate<view name>.I<node name>Element element = wdContext.node<node name>().create<node name>Element();
    wdContext.node<node name>().addElement(element);
    element.set<Att>();
    to retrive:
    int s=wdContext.node<node name>.size();
    for(int j=0;j<s;J++){
    wdcontext.node<nodename>.getnodeelementAt(j).getAttribute();
    Check this link about tables
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4
    Regards,
    Vijayakhanna Raman

  • How To Get more than one Return Values in LOV ADF

    In ADF LOV, I can get only one return value;
    How can I Get more than one values like in Oracle Form?
    SomeOne can help me?
    Thanks

    you may add more <set> tag like the following:
    <event name="lovSelect">
    <set property="inputValue" value="${bindings.Id.inputValue}" target="${data.work_workBusinessViewUIModel.buyCompanyId}"/>
    </event>
    or you can implement your Action

  • How to create Single Queue for more than one interfaces(XI)

    Hi Experts,
    I want to set up a separate queue for 3 interfaces which all are outbound IDOC to FTP.
    Please let me know ' Hhow to create a queue for multiple interfaces with Quality of Service 'EO''.
    Thanks,
    Srinivas P.

    The same reason that Apple and 3rd Party vendors put multi-size templates in one file I expect. I am trying to construct an in-house standard template for use in our company, and it is easier to manage if there is only one file to send to people rather than many - both initially and for subsequent edits / updates to the template.
    Of course it would be possible to create several templates (one for each size). But since it is clear that templates can be combined, it appears sensible to do this - unless the doing of it is horridly complicated

  • Can a user have more than one RBS value?

    In our current environment, we have our RBS structure setup similar to our University organizational chart. Many of these groups collaborate with each other on projects and this structure does not allow for one user to see projects from multiple departments.
    For instance, our Admissions office collaborates on projects with our IT group. If Admissions enters a project in PWA, the IT group will not see the project proposal until an IT resource is assigned. But, since we are just at the proposal stage, we would prefer
    to not assign resources until the project is approved. As it stands with our current RBS structure, if a user in Admissions is the project owner, the IT group cannot see the project.
    Would like to avoid setting individual project permissions when collaborating with multiple departments.
    So, Admissions needs to have the project show on their project list (for planning and portfolio purposes) and IT needs for it to show on their project list, for the same reasons. How can we accomplish this setup?
    Thank you for any help you can provide.

    SycamoresPM,
    A single user cannot have two RBS values at the same time.
    Your best bet in this scenario would be to rather depend on the "project Team". So, whoever is part of the team could see the project, rather than the RBS itself.
    In this case, regardless of the department, the resource could be added to the schedule and once published, will be seen the team member. That should solve your issue, in my opinion.
    Cheers,
    Prasanna Adavi, Project MVP
    Blog:
      Podcast:
       Twitter:   
    LinkedIn:
      

  • Returning more than one row (value)...

    I am running the following:
    SELECT
    (CASE
    WHEN AF.asset_flow_type = 39 THEN decode(sum(asset_flow_amount),0,NULL, sum(asset_flow_amount))
    WHEN AF.asset_flow_type = 40 THEN decode(sum(asset_flow_amount),0,NULL, -sum(asset_flow_amount)) END)
    FROM O_ASSET_FLOW AF, REPORT_CLIENT RC
    WHERE AF.asset_flow_type IN (39, 40) AND AF.orig_partner_id_1 = Control.AnonymisePortfolio(RC.PORTFOLIO)
    GROUP BY AF.asset_flow_type
    This returns 2 values, one with AF.asset_flow_type = 39 and one with AF.asset_flow_type = 40. How do I return just one value? Since it needs to insert the value into a column, only one value will be acceptable. I need to return one value if AF.asset_flow_type = 39 and one value if AF.asset_flow_type = 40, but not both at the same time.
    Thanks.

    First thing, you shouldn't use dynamic SQL for this simple update statement. Your procedure should look similar to this.
    CREATE OR REPLACE PROCEDURE <procedure_name>(p_asset_flow_type O_ASSET_FLOW.asset_flow_type%TYPE,
                                                            <other parameters if any>)
    BEGIN
    UPDATE REPORT_CLIENT RC SET
    nnm_percent_assets = (CASE WHEN assets_chf_vormonat IS NULL OR assets_chf_vormonat = 0
                          THEN NULL
                          ELSE (decode(((nvl(total_nnm,0) * 100)/nvl(assets_chf_vormonat,0)),0,NULL,
                                  trunc(((nvl(total_nnm,0) * 100)/nvl(assets_chf_vormonat,0)),2)))
                          END),
    mandate_shift = (Select decode(sum(asset_flow_amount),0,NULL,
                        sum(asset_flow_amount)) from O_ASSET_FLOW AF
                        where AF.asset_flow_type = p_asset_flow_type
                        AND AF.orig_partner_id_1 = Control.AnonymisePortfolio(RC.PORTFOLIO));
    END <procedure_name>;

  • Plot more than one analog value to a waveform chart by reading from Serial Port

    I have 4 LDRs and I want to plot their values to a waveform chart by reading them from the serial port. I have looked around and found an example of a VI plotting one value to a waveform chart (attached below) but I am unsure about how to expand this for 4 different waveforms, mostly because I don't particularly understand the way is being read currently. If someone could either point me in the way of a relevant example or explain/show me a solution, or explain howthe current VI I have works, that would be greatly appreciated.
    Attachments:
    LDRread.vi ‏20 KB

    Since I assume each LDR (whatever that is) has its own serial connection, you will need to read from 4 different serial ports.  From there, just form an array of all the data and write to the chart.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

  • Issue while passing more than one promt value to bi publisher in 11.1.1.6

    Hi all ,
    i have created a dashboard prompt with two columns . i want them to pass to bi publisher report to filter out the result. but for some reason it's not applying both filters. It just refreshes the page with default value.
    any idea how to resolve this issue.
    thanks

    Brent,
    In the statement
    ${JHS.pageDefGenerator.addBinding($JHS.page,"JhsUsers","#CUSTOM_BINDING2()")}
    the second argument should be the id of the binding you want to add. You use twice "JhsUsers" as id for the binding.
    This id should be the same id as used in your XML page snippet, so for the first binding it should be "SubjectsActiveVisitsGraph" and for the second binding it should be "SitesActiveVistsGraph"
    Steven Davelaar,
    Jheadstart Team.

  • Is it possible to return more than one field values to base form from LOV ?

    Hi
    I have a form with employee_number, employee_name, email_address, phone_nos...etc. I have a LOV to select employees from remote database, I want to send selected employee details to current form through LOV. Is it possible?
    Now I am doing like this..From LOV , I am selecting Employee number, after return that employee number, through process,button and javascript (onBlur), I am populating the other details for that employee_number.
    Please advice me if we can do this in better way in HTML_DB.
    Thanks
    Raju

    You may want to try creating your own custom popup lov
    http://www.oracle.com/technology/products/database/application_express/howtos/how_to_create_custom_popups.html
    you can then create your own lov report listing all people and then when you click the name required you can passback as many values as required to the calling form.

  • Recalculate sum of More than One Asset asset values

    Hi Team,
    Can you please guide whether there exists any T-code through which we can  Recalculate  sum of more than One Asset values  at single point of time.
    ex: iif we go asset master (AS02), in the Edit tab,recalucates values, in the asset master we can do only one single asset,
    but as we required do the recalculate asset values at a time more than one asset.
    Please let us know is there any t.code ?
    Thanks
    Ram

    Hi Ram,
    What you the system does in AS02 Menu: 'Edit - Recalculte values' is exactly the same what AFAR does. The difference is, in AS02 you only recalculate the values for that very asset. But all values that need value recalculated and updated will get adjusted when executing this step. So, if you have made a posting to the asset that for any reason did not update the table yet, and therefore is not reflected in the Asset Explorer, you can first simulate a recalculation for this asset and see what would be the new update of values. Then when you go to AS02 Menu: 'Edit - Recalculte values' the system will actually adjust the values in real time. Same is when you make a change to e.g. depreciation key, it will require an adjustment of values and a recalculation will do that.
    So, whether you use AS02 for the single asset or use AFAR - the system does exactly the same.
    The difference is however, that in AFAR, you recalculate the values for ALL the assets in that company code. For example, it is recommended that before you do the depreciation run or periodic posting run at the end of each period, that you ran also the recalculation program RAAFAR00 for the company code, so that any value adjustment/changes in values will be captured before running depreciation or periodic postings.
    I hope this clarifies. Please also check on the online documentation in help.sap.com for more information.
    Else, if you need to adjust other values on the asset and it is not about recalculating values, then you can use a write-up/unplannded depreciation (check it out under Easy Access Menu: Manual Value Correction) or maybe you can use the transaction for miscellanious ABSO.
    I hope this helps you further.
    Kind regards,
    Brigitte

  • Can an MIDP application have more than one MIDlet?

    Hi,
    in my MIDP project, i have done my 3 modules all seperately.
    i have made 3 projects in the wireless toolkit and each project has one MIDlet.
    now i want to integrate these projects.
    can my one single project have more than one MIDlet.

    You can't really call one MIDlet from another.
    If your MIDlet Suite has more than one MIDlet then the when you open the MIDlet Suite you'll get a menu so that you can choose which MIDlet to start.
    What you want to do is to separate your applications from the MIDlet class. So your "main" classes won't be ones that extend MIDlet. Instead you would just have a "skeleton" MIDlet subclass that instantiates one of the main classes and starts it. This way you can easily integrate different applications, and have them call one another.
    shmoove

Maybe you are looking for

  • Live 1.2km of xchange: 1.367Kps down/Was: 2.5Kps- ...

    1.2Kilometres from the exvhange and I now get 1.367Kps- downstream, it was never near it's full potential of 20meg+ADSL2+ speed, or even the ADSL 8meg service. For a long time I was the reciepent of a 2.5meg service. I would like to think that I know

  • Problems with FOI layer using mod_wl in Apache

    Hello everybody, I have published my application on web. I use MapViewer 1033 on Solaris 10 and Apache 2.0.59 on Windows XP. To proxy my requests I use mod_wl module in Apache. When I try to load base map everything is ok. But when I try to load FOI

  • 3750 as a router and a switch. sub-optimal routing problem

    Objective: To limit the traffic on Vlan8. We are seeing traces from K1 or T1 to 192.168.1.4 like this: 1- 10.10.10.5 2- 10.10.20.1 3- 192.168.1.4 then 1- 10.10.10.4 2- 10.10.30.1 3- 192.168.1.4 or 1- 10.10.10.5 2- 10.10.200.1 3- 192.168.1.4 this caus

  • HT1879 i tried find music from the movie HOW THE WEST WAS WON?

    I am new to Itunes.  How can I search for music. There is so much stuff on the pages it is confusing.,  I want to be le to search for music and preview tghen buy

  • Reporting-Opportunities and their Competitors & Opportunities and Partners

    Does anyone have a solution of retrieving Opportunities and their Competitors & Opportunities and Partners? My client needs the ability to view this type of detail. Does anyone know if I can use QueryPage? Can this be done in Siebel, or do I need to