Questions tagged [compareobject]

Usually refers to object comparison in object oriented languages.

Typical cases compare:

  • Ojects values.
  • Object references.
  • Object types.
99 questions
0
votes
1 answer

Powershell - Write Object to File

when I want a full compare of two textfiles linewise I have the correct result when I use: $test = compare-object -referenceobject $srcobject -differenceobject $compareobject -CaseSensitive $test = $test | where {$_.SideIndicator -eq "=>"} | select…
Farbkreis
  • 604
  • 3
  • 12
0
votes
2 answers

Finding index value of an Object arrayList using indexOf() in Java

This method scans the current staff Employee array to see whether there is a match between the any member of staff and the Employee passed in. Return -1 if there is no match, and the index number of the Employee if there is a match. Now my…
Saif Azmi
  • 63
  • 6
-1
votes
1 answer

Compare-Object not saving to CSV correctly

What I'm trying to do is compare the data from two pscustomobject arrays, Then have the data that doesnt matches saved into an array. That array will then be exported to a CSV file. This is what i have. function DataCompare { $NotMatch =…
-1
votes
2 answers

== or ===, which one should I use to compare two objects in javascript?

I do not mean deep comparison. I just want to know if two variables refer to the same instance. Should I use a==b or a===b? Can two variables point to the same memory but with different types? Because javascript has no such concept as class in C++,…
William
  • 761
  • 2
  • 10
  • 27
-1
votes
1 answer

Using "Compare-Object" resulting in improper formatting

I currently have two arrays full of names. One contains data read in from a txt file, and one read in from a CSV file. I'm trying to return lists of names that appear on both lists, and that only appear on individual lists. For the CSV file,…
JK72
  • 149
  • 1
  • 8
-1
votes
1 answer

Comparing two lists of class objects similar to a Diff Tool

Question moved here. My requirement is to write a program that sort of mimics diff tools. Yes there are quite a few libraries and open source code that accomplishes this purpose, but I would like to write my own comparer. Here's the starting point.…
Sach
  • 10,091
  • 8
  • 47
  • 84
-1
votes
1 answer

Compare more than two strings

Here is what I am trying to achieve... I have to view the ADAM db in VMWARE to see the replication times. My question is how would I compare more than two strings using the compare-object command. I cannot find any articles on more than two…
user1475623
-2
votes
1 answer

Assigning values to the an array after using Compare-Object

I have been trying to assign values of Compare-Object results but i am getting additional informations on the output. Here is the code: $a = (dir C:\_pc\*).BaseName $b = (dir C:\Users\username\Documents\folder\Jezyki\*).BaseName $c = (Compare-Object…
AESTHETICS
  • 989
  • 2
  • 14
  • 32
-3
votes
2 answers

How to compare two objects in javascript and get difference?

I have two objects to compare. I want to find the key and its value which is different in the second object. Which should return only the different key and its value in an object. const obj1={name:"abc",age:21,place:"xyz"} const…
1 2 3 4 5 6
7