473,765 Members | 2,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you loop through an arraylist for unique values?

103 New Member
I am grabbing data from three entities and want to grab a field value in each of the entites and place it in an arraylist. What I would like to do is loop through the arraylist for all the values and do something for each value only once. If the value in the array list is repeated, I want to not do anything for it and continue till the end. Basically, I loop through all the values do something for each value and skip over the repeated value if I already did something.
Aug 19 '12 #1
1 1821
Rabbit
12,516 Recognized Expert Moderator MVP
While looping, check it against your list of already processed values.
Aug 19 '12 #2

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

Similar topics

0
1065
by: Anas M. Nebuchadnezzar XXXVII | last post by:
I'm not sure if this is the right forum to ask this, seeing this problem is pretty much straight XSL, but here goes. I'm writting a simple employee database, and I want to be able to: A) get a node-set returning only unique values based off of a query. (the names of all the managers) b) loop through each of the nodes, sorted by the list of the managers. My Xml looks something like this:
1
1290
by: jason | last post by:
NEWBIE - Hello. I've been able to do the following in other languages (perl,jscript,etc.) but am a asp.net newbie and need some help. I have this textbox that has a bunch of data in it. At the beginning of almost every line I have some names followed by a ":" Many (about 3/4) of the names will be duplicates. I'd like to produce a unique list of names (as they appear) and the count of unique names. So far I can produce the list of...
1
7209
by: Joep | last post by:
Hi, In VB.net I have an array which contains different values. For example: array(0) = 2 array(1) = 2 array(2) = 2 array(3) = 3 array(4) = 3 array(5) = 6 array(6) = 6
8
18598
by: nescio | last post by:
hello, i have an array and i don't know the content of it, but i want only unique values. in php there is a function to do this, but how must i do this in javascript? i have tried a lot and it is driving me nuts
5
11697
by: jdwyer05 | last post by:
Hello, I am trying to populate a combo box with only unique values. Currently I am using an access database and VB6 Enterprise. The program populates the combo box fine however, there are several repeated values in this column. What i would like to do is just show one instance of that particular record. For example: if the column has the values: Accounts Payable, Process Control, Shipping, Accounts Payable i would like the combo...
11
3947
by: sqlservernewbie | last post by:
Hi Everyone, Here is a theoretical, and definition question for you. In databases, we have: Relation a table with columns and rows
0
9399
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9957
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8832
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5276
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.