473,320 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

I need to fetch information from 2D array and if they are match put in temp

private WSUser[][] getUsersInRole (WSRole[] roles, WSUser[] input_users) {
boolean found = true;

/// Initialize output_users: 2-dimensional array of WSUser; first dimension is same length as WSRole.
WSRole[] role = null;
WSUser[][] output_users = null;
Array[][] temparray=null;
//temparray = new int[roles][input_users];
// WSUser[][] temp=null;
/// Iterate through roles (using int i) and get array of WSUser for each
for(int r =0; r<roles.length; r++){
WSUser[] users = roles[r].getUsers();
for(int i=0; i<users.length; i++){
// Compare roles[i].users to input_users, add matches to tempusersarray
if(roles[r].getUsers().equals(users[i].getName())){
if(found=true){
// temp =users[r][i];
}
}
}
}
// Set output_users [i] = tempusersarray
//output_users =temp;
return output_users;
}
Feb 17 '10 #1
0 1095

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: lawrence | last post by:
I've been bad about documentation so far but I'm going to try to be better. I've mostly worked alone so I'm the only one, so far, who's suffered from my bad habits. But I'd like other programmers...
2
by: Mike Button | last post by:
Hello all, I am really really desperate on what I should do, and I am asking for help from anyone in this newsgroup, here's the situation: I am creating a form that is being run on a server...
3
by: Peter J Ross | last post by:
Greetings. I'm quite new to PHP and have very little knowledge of programming in general, so I may be missing something obvious, but I can't find a solution to the following difficulty in either...
10
by: ATeal75 | last post by:
I'm a college student, and I'm having trouble with one of my assignments. We creating a spell checker in javascript that has to compare a user submitted word (using forms) to a 5 word dictionary. ...
7
by: dtschoepe | last post by:
Hi, I am working on a project for school and I am trying to get my head around something weird. I have a function setup which is used to get an input from stdin and a piece of memory is created...
8
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005, .net 2, C# for Windows application. I use DllImport so I can call up a function written in C++ as unmanaged code and compiled as a dll us vs2005. My application is able to...
3
by: Andz | last post by:
I'm using explode() to extract and make an array() readable. I'm able to make the array() from dbase readable. categories_table { catid name 1 'test1' 2 'test2' 3 'test3'
1
by: Brian | last post by:
I have a similar xml file and I redisplay it with the following array in PHP. What I would like to do is sort the <idfield before it is redisplayed. Looking for a sample code. Thanks <rss>...
0
by: LanaR | last post by:
Hello, one sql statement is causing severe performance issue. The problem occurs only in UDB environment, the same statemnt on the mainframe is running fine. I have an explain output from the sql....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.