473,703 Members | 2,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to compare two array ?

43 New Member
Hello

I want to compare two array and save the miss match caharector into 3rd array.

how to do it give me the best answer.
Apr 9 '10 #1
1 2651
tlhintoq
3,525 Recognized Expert Specialist
A loop within a loop

loop through Array 1
Select an element
Loop through Array 2
Was a match found to the element from loop 1?
If no match, add it to array 3
Apr 9 '10 #2

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

Similar topics

0
2710
by: Phil Powell | last post by:
/*-------------------------------------------------------------------------------------------------------------------------------- Parameters: $formField1: The name of the first array $formField2: The name of the second array $formField1CompareWith: String to use as my comparison basis for first array. Defaults to using $val unless it's 'key' $formField2CompareWith: String to use as my comparison basis for second array. Same default as...
5
2993
by: Jim H | last post by:
I will have many 3 byte Byte arrays. Is there a way to compare the values without iterating through and comparing each element in the code? Example: byte lTest1 = new byte {0x1, 0x2, 0x3}; byte lTest2 = new byte {0x1, 0x2, 0x3}; byte lTest3 = new byte {0x1, 0x5, 0x3}; if(Comparer.Equals(lTest1, lTest2)) System.Diagnostics.Trace.WriteLine("Test1 and Test2 are the same", "Debug");
5
3109
by: sjoshi | last post by:
I have an SQLBinary (8) field(mts) with data like 0x01F4000000000000, 0x0400000000000000, etc. Now I need to compare just the first 4 bytes to an Int32 field (cts) and update the SQLBinary field if it's different. What would the be the best way to do this. Like for this data, which is stored like this. cts=4 mts=0x0400000000000000
2
11335
by: Tom | last post by:
What's the best way to compare two byte arrays? Right now I am converting them to base64 strings and comparing those, as so: 'result1 and result2 are two existing byte arrays that have been loaded Dim data64_1 As String = System.Convert.ToBase64String(result1, 0, result1.Length) Dim data64_2 As String = System.Convert.ToBase64String(result2, 0, result2.Length) Debug.WriteLine(IIf(data64_1 = data64_2, "Equals", "NOT Equals"))
4
1991
by: Justin Emlay | last post by:
I have two lists. These can be in either table form or array. That is, my data is in a dataset which I can move to an array if need be. ListA is a master list and it contains all items. ListB contains the same items but not necessarily all the items. I need to know which items are missing. I remember messing with a compare array function but now I can't seem to find it anywhere. Ideas? I would rather NOT loop through each item in...
12
29461
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as follows: function doDateCheckNow(source, args) { var oDate = document.getElementById(source.controltovalidate); // dd/mm/yyyy
2
1917
by: veinnz | last post by:
hi all... i'm kinda newbie in php...so i would like to ask ur guidance on how to compare the distribution of whitespace between two text area? so let's say text area 1 i type : hi how are you text area 2 i type : you've got it right both has the same distribution of white space but since php ignore the whitespace.. i've this idea is by replacing all the whitespace into something else 1st...let's say to "@".. bt then i've problem on how...
3
2893
by: =?Utf-8?B?UmljY2FyZG8=?= | last post by:
What is the best method to compare 2 array to knw if each element is equal? Now, i have to compare the datarow.itemarray of 2 datarows wich is equals in structure. I tried to write this routine: (OPTION STRICT MUST BE ON!!) Private Function ISArrayEquals(ByVal A As Array, ByVal B As Array) As Boolean For index As Integer = 0 To A.Length - 1 If A.GetValue(index) <B.GetValue(index) Then '<----Here is the error! Return False End If
3
10554
by: raylopez99 | last post by:
This is an example of using multiple comparison criteria for IComparer/ Compare/CompareTo for List<and Array. Adapted from David Hayden's tutorial found on the net, but he used ArrayList so the format was different. Basically you can sort a class having members LastName (string), FirstName (string) and Age (int) according to whether you want to sort by Last Name, First Name or Age, using the .Sort function
4
4237
by: toadstool | last post by:
I have an array containing the various products $inventory = array(); $inventory = "whatever1"; etc I have an array containing various values $quantity = array(100,200,300); I call in a value from a form $_POST; say I assign a variable
0
8747
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9106
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...
0
8955
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
7849
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...
1
6585
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4419
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...
0
4675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3113
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
3
2056
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.