Questions tagged [compare]

1

votes
4

answer
41

Views

Check string for specific format of substring, how to..?

Two strings. My items name: Parfume name EDT 50ml And competitor's items name: Parfume another name EDP 60ml And i have a long list of these names in one column, competitors names in other column, and I want to leave only those rows in dataframe, that have same amount of ml in both my and competitor...
milka1117
0

votes
1

answer
24

Views

Visualise differences between factor levels using ggplot

I have a plot in my mind that I would like to create, but I don't know how to successfully achieve this goal. I have 2 dataframes, one containing the mean value for each factor level, and the other, pairwise differences between these levels. contrasts
0

votes
2

answer
28

Views

Difference between Atomic set() and getAndSet() methods in Java

In one of my programs, I was trying to update the value of an Atomic Integer, but could not decide between set() and getAndSet() methods because they both seem to do the same. //Sets the newValue to the volatile member value public final void set(int newValue) { value = newValue; } and public final...
Steve
1

votes
2

answer
352

Views

Comparing objects and its member variable

Suppose I have two objects of same class for example: public class Example { String name; String rollNo; String address; String phoneNo; String city; } Example obj1 = new Example(); obj1.name = 'Name'; obj1.rollNo = '10'; obj1.address = 'Address'; obj1.phoneNo = 'Phone Number'; obj1.city = 'City'; E...
Vishrant
1

votes
2

answer
25

Views

Can I compare fields from another line in the same table

I have a table where the quantity of the line is generated increasingly per Order. So instead of having Qty per box I have : Qty Box 2 = Qty Box1+Qty Box2 Qty Box 3 = Qty Box2+Qty Box3, etc... I found a way to calculate Qty per box in Excel with this formula: = IF(Line2(Order)=Line1(Order) THEN (Li...
Dumbo
1

votes
1

answer
906

Views

Cannot select target in SQL Server Schema Compare, Visual Studio 2017

I'm having an odd problem wich I haven't been able to find a solution for. Suddenly I am not able to select a Target or Source in Schema Compare in VS2017. When I click the Combobox nothing happens. It is still possible to do a Data Compare and SQL Queries. I've updated SSDT to version 15.5.1 but w...
jhe
1

votes
0

answer
36

Views

Python difflib getting coherent data from ndiff instead of plain strings

The project I am working on involves running a compare algorithm on 2 versions of the same file and the writing the results to a single log. I am trying to use difflib.ndiff for this as I want the exact character that were changed, and unified/context diff do not give such results. ndiff returns a...
Rares Dima
1

votes
1

answer
47

Views

comparing two cells in certain pattern VBA

I'm trying to compare two excel's cells in certain pattern using VBA. The table is separate by empty rows. And the patter is: I'm looking at column A. If cell A1 is empty I'm moving to next one. If cell A2 is not empty then I'm compering $A2$ to B2, B3, B4, .. etc until I hit the empty cell. If so,...
Grzegorz Pyko
1

votes
1

answer
48

Views

How to compare the shape of one SortedSet to another in C#

I'm trying to compare the shape (by shape, I mean the shape of the binary tree) of one SortedSet at a certain index of a List of SortedSets against all the rest of the SortedSets in that same List. I've tried to look up ways to compare Binary Trees, but I don't know how to do it with SortedSets inst...
Snaps56
1

votes
0

answer
74

Views

C# nested HashSet comparison not working for me

last line return false, I would appreciate if someone could explain how come? Many thanks! IEqualityComparer < HashSet > hashSetComparer = HashSet.CreateSetComparer(); var h3 = new HashSet( hashSetComparer ) { new HashSet{ 1, 2 }, new HashSet{ 3, 4 } }; var h4 = new HashSet( hashSetComparer ) { new...
Gigel
1

votes
0

answer
54

Views

ssdt - Schema Compare - ignore log files

I am running schema compares from the command line. The ONE option that does NOT seem to have a toggle is log/sql files. Regardless of my setting every single toggle to OFF I STILL get the sql/log files showing up in my compare results. What do I do to toggle these darn things OFF?
user5855178
1

votes
2

answer
53

Views

Compare letter in java

I want to compare every letter on file 2 with file 1. example : file 1 : my name file 2 : mi [email protected] i want to get the number of difference is 3, on file 2 : (i, @,and s). Can you help me Here is my code public float getCER(String originalteks,String extractteks){ int end=0; int start=0; int differ...
michael
1

votes
0

answer
45

Views

WP - WooCo. - Compare - Button

I am using Wordpress for my online shop. I have a problem. On the page with the product, I added a button for comparing the products. All is well but I want that after pressing the button, it becomes invisible. And I get Uncaught Error: Call to a member function get_session_cookie() on null in Can...
Johnny Smith
1

votes
1

answer
922

Views

C# Comparing 2 Bitmaps with tolerance?

I want to compare two Bitmaps, but with tolerance. My current code gives says 'ciCompareOk' only if both images are exact the same. Both have the same size and the same shape in it, sometimes its darker or lighter. How could this look with tolerance? public static CompareResult Compare(Bitmap bmp1,...
xDrago
1

votes
1

answer
167

Views

Choose A as output of merging in KDiff3

Currently I've got stuck with merging files in KDiff. Let's say I have file A and B. A is in the left and B in the right. And now I want to merge file B to A, but when I click Merge Current File button, it shows merge editor with B file as an output of merging. How can I choose A as an output file?
1

votes
2

answer
83

Views

compare two objects of same class which contain list of objects

I have two objects(which contain of list of objects) of same class.I need to find whether both are same or not. Consider below example: class Device { String deviceName; String devLocation; String devType; String devID; public String getDeviceName() { return deviceName; } public void setDeviceName(S...
Arjun
1

votes
1

answer
284

Views

Replacing #pragma omp atomic with c++ atomics

I'm replacing some OpenMP code with standard C++11/C++14 atomics/thread support. Here is the OpenMP minimal code example: #include #include void omp_atomic_add(std::vector const& rows, std::vector const& cols, std::vector& values, std::size_t const row, std::size_t const col, double const value)...
fast asleep
1

votes
3

answer
65

Views

Python: Comparing dictionaries for multiple scenarios

I'm comparing dictionaries of server files that contain up to 100,000 results. I have captured a list file from my servers, and I have read them into dictionaries in my program. The key values are an md5 hash, and the v values are a path (i.e /usr/john/upstart.exe). My dictionaries are named first...
Jared Roy
1

votes
1

answer
36

Views

get first and second place of a game

I'm trying to make a soccer division and get both the first and second place of the teams after playing their respective matches, I need to do this by comparing their total wins and in case of tie, by difference of total goals. This is the class for the team: class Equipo: pais = None media_gol = 0...
Jaco
2

votes
3

answer
22

Views

Python - Comparing 2 identical strings returns 'False'

When I compare these 2 strings, the value I get is False. a = 'comentar' b = '️comentar' print(a == b) # False How could I fix this? I have tried changing the encoding of both strings but it does not have any effect. You can try it here: https://onlinegdb.com/HJ8xYLPq4
Babarrun
1

votes
2

answer
21

Views

Compare and highlight

I compare 2 tables with numbers and need to highlight number red in TABLE A if it's less than number on TABLE B. Could you please help with this? Thanks.
Ego
1

votes
2

answer
46

Views

Java: Finding the value in an array list that is closest to a particular negative number

My question is how I can write a method that takes an ArrayList of Doubles as a parameter and returning the Double in the array list that is closest to -3.75. I got the code down for the positive number 3.42, but I'm stuck as to modifying it to suit -3.75 public static double question3(ArrayList inp...
loopzoop
1

votes
0

answer
35

Views

Python Traversal for match between 2 files, appending new column with match results

I'm working with 2 dataframes for bike-share information. One dataframe called 'stations1' is 105 lines long, consisting of bike-share station geographical information: station number, address, latitude and longitude. The other dataframe called 'trips1' has over 10,000 lines, and consists of trip...
Billy
1

votes
0

answer
28

Views

Google Sheets: Inside “COUNTIFS” statement check if value is contained in range

I want to count the number of customers who have a zip code in our supported zip codes list. In order to do so, I am currently comparing the zipcode attached to a user to zipcodes in our supported addresses tab. This is the best way I could come up with for the time being but it only works with a si...
Kiley
1

votes
1

answer
35

Views

compare-object issue using powershell

looking for the best way to compare two system.objects. tried the compare-object option, doesn't seem to give the desired output.. > $abc BGP summary information for VRF default Router identifier 192.168.0.3, local AS number 7251 Neighbor Status Codes: m - Under maintenance Neighbor V AS...
Suri
1

votes
1

answer
57

Views

Compare measured time difference with float

I have some code, where I want to measure a time difference in c++. After a certain time, saved in a float variable, I want to start some stuff. Is there a way to cast a time duration to float or to compare with a float value? Here's some code: float maxDiff = 5; auto start = std::chrono::high_resol...
köbes_11
1

votes
1

answer
36

Views

Solr - Subtract 2 columns and store the result in the 3rd column

I am trying to compare 2 columns in solr. After searching a bit I realised that it is not possible in solr and i need to make a new field and store the result at the time of indexing . So far i have created a new field called compare of type Boolean , but i have this question when will the compare f...
Harjeev Singh
1

votes
1

answer
81

Views

Fastest way to determine sequence from stream in c#

I need to read bytes (converted from string to byte array and then sent to stream) from stream and stop reading as soon as I encounter specific sequence, in my case it's [13, 10, 13, 10] or '\r\n\r\n' if converted to string (ASCII). Currently I have two versions of the same process: 1) Read from str...
1

votes
1

answer
9

Views

Why isnt my module always printing the lowest of 3 single inputs?

I am trying to get it to print the lowest of the 3 inputs but it is sometimes printing the second lowest. a = (input()) b = (input()) c = (input()) if int(c) < int(b) and int(a): print (c) elif int(b) < int(c) and int(a): print(b) elif int(a) < int(b) and int(c): print (a)
ClintFromNYtoVA
1

votes
2

answer
86

Views

How to compare and count the differences between two files line by line?

I need to compare two files line by line. In each file, the line just has either 1 or -1 so if the lines are the same, don't count and if it's different then count =+1. For example: File1 line1= 1 , file2 line1 =-1 then count = 1 File1 line2= 1 , file2 line2 =1 Don't count, so count stays 1 I am t...
user9323924
1

votes
1

answer
27

Views

Compare object with objects

I have that object with simple objects public positions = { reading: { left: '0px', }, writing: { left: '0px', }, speaking: { left: '0px', }, listening: { left: '0px', }, }; I need to check if some of the 'left' properties are the same and if they are add 'top' property to one of them. For example i...
Przemek Urbaniak
1

votes
1

answer
255

Views

Lc3: How do I compare two values?

I am trying to write an lc3 assembly language problem but I am pretty stuck. The program must take in two digits and output which digit is larger. I am required to use a subroutine to accomplish this. Now, I am putting the first digit in r1, the second digit in r3, and i have to put the output in r0...
wissam hammoud
1

votes
2

answer
59

Views

make 2D array inequality check faster

i working in school Al project it all work well but little slow. in my project i have overridden equals method. @Override public boolean equals(Object obj) { if (obj == null) { return false; } else if (obj instanceof map) { map m = (map) obj; for (int i = 0; i < mapSize; i++) { for (int j = 0; j < m...
nima_moradi
1

votes
0

answer
178

Views

Apache Commons DiffBuilder, deep compare

We try to use Appache commons DiffBuilder and also ReflectionDiffBuilder in version 3.7` to compare two complex objects each other. For a simple object it is working really good, but I'm not able to get it work with properties which are an List of other Complex Objects which could contain again a c...
Michael Burger
1

votes
1

answer
456

Views

Powershell Compare two XML-Files and only get the value of the change

I wannt to compare two XML-Files in Powershell. So my Code looks like: $compareTempVar = Compare-Object $XML1 $XML2 So the Result is: InputObject .................... Some Text 'Orginal'..... And some more text...... Some Text 'Change'...... And even more text...... (The Xpath is to long, to see the...
Hi im JJ
1

votes
0

answer
1.5k

Views

Vis.js Vs DagreD3

I would like a to know the difference between Vis.js - https://github.com/almende/vis DagreD3 - https://github.com/dagrejs/dagre I find both quite similar, but these are what I found :- 1) When I visualize in Vis - The output keeps varying, I see isomers of graphs being generated, but in dagreeD3 t...
Rudra Roy
1

votes
0

answer
487

Views

Compare Names using Levenshtein distance

In my application i need to identify a person by searching for their lastname and firstname. One requirement is to accept spelling errors to a certain degree. My attempts to identify a person given a firstname and lastname were: sql query using soundex sql query using levenshtein-distance (LD) wh...
surfmuggle
1

votes
1

answer
35

Views

Compare two files using awk having many columns and get the column in which data is different

file 1: field1|field2|field3| abc|123|234 def|345|456 hij|567|678 file2: field1|field2|field3| abc|890|234 hij|567|658 desired output: field1|field2|field3| abc|N|Y def|345|456 hij|Y|N I need to compare.if the fields match , then it shld put Y , else N in the output file.
Kushal Rastogi
1

votes
0

answer
112

Views

SSDT exclude fill factor from table definition

SSDT has an option to ignore fill factor (IgnoreFillFactor). But what it actually does is: it doesn't flag object as changed if there are only fill factor changes. If there are some additional changes fill factor will be published together with those. The actual issue comes when someone is using sc...
Ramūnas
1

votes
1

answer
322

Views

Powershell Using a CSV list to check a folder for missing files

I'm kind of new to scripting, forgive me for any obvious answers here. Basically, I have a large list of music files stored in a folder that I update every month. I created a smaller folder for testing purposes: I have a CSV list of all the files that should be in the folder: I'm trying to create a...
jl93

View additional questions