8,203 questions
0
votes
1
answer
52
views
Issues with tuple comparison while using a specific class that bypasses comparison
During a current school project of mine, I came up with a specific sorting algorithm which I nicknamed parallel_sort. By giving it a list of integers and a list of dictionaries, it sorts the ...
1
vote
3
answers
163
views
Comparing multiple flags at once
I have a script which checks the value of a series of flags before deciding on an execution pathway. Because of the way the script executes, the flag values are held as script properties, therefore ...
0
votes
4
answers
247
views
How can I compare two pandas DataFrames with object-type columns, with a numeric tolerance?
I have two pandas dataframes: One assembled manually in Python, the other imported from a dashboard's .csv output.
All columns in both dataframes are objects, and look like this:
2020
2021
2022
2023
0....
0
votes
3
answers
94
views
How Do Sets and Set Comparisons Work in Python? [duplicate]
I'm learning Python coming from some beginner-level experience with Java. It all makes sense for the most part, but one of the exercises kind of made me wonder what actually happens within Python.
...
1
vote
2
answers
111
views
How do I assert that two pointers are equal with GLib's testing framework?
I'm writing a unit test with GLib's testing framework where I want to check if two pointers point to the same place in memory. I do NOT want to compare the actual memory which they point to, so ...
0
votes
0
answers
53
views
EXCEL - Comparing multiple dates against a single date value for highlighting
I'm trying to use conditional formatting to compare the date output from multiple cells and columns against one date value.
The condition works but in an undesired state. The condition evaluates ...
2
votes
1
answer
211
views
Comparing initialized floating point variable to zero, again
We know that floating point values cannot be compared with the == operator, due to precision issues. However, the following code, which initializes a double variable to an integer 0, successfully ...
0
votes
2
answers
65
views
SQL row-wise comparison within group
I am trying to compute the number of events that take place within 30 minutes of one another (variable n_within_30) on the same date and in the same location.
I have tried to partition and group by ...
1
vote
1
answer
114
views
jspdf Tahoma Font rendering different from other PDF
To use the Tahoma font in my PDF I loaded the TTF file from my Windows/Fonts folder into a converter which holds a Base64 string as input to the jsPDF plugin.
Now the results show different from ...
3
votes
1
answer
106
views
Is it defined behaviour to compare two null pointers for order
I have implemented begin and end functions for MFC containers. The iterators are pointers to the internal data and may be null pointers for an empty container. What happens if both are null pointers ...
0
votes
0
answers
36
views
Test statistic T in MRPP with vegan package
I'm running mrpp() function from the package vegan. I'm currently trying to move my analysis from PCORD to R so I'm developing a code to match the results. PCORD calculates an statistics test T which ...
1
vote
0
answers
38
views
max() output depends on order when nan is present [duplicate]
I am puzzled by this behaviour of Python's max() function:
>>> a = 100
>>> n = float("nan")
>>> a
100
>>> n
nan
>>> max(a, n)
100
>>> ...
0
votes
0
answers
48
views
Parallelism for many dataframes with sparksqlcompare
I have many number of data frames up to 10. I need to compare 10 data frames with other 10 data frames which are independent to each other. Each of data frame has a specific keys to be compared. ...
1
vote
3
answers
76
views
How to filter array of objects with filter with dynamic properties count?
I have an array of objects with some bool and int properties:
let employees = [
{ isSkilled: false, isLeader: false, departmentHeadType: 0 },
{ isSkilled: true, isLeader: false, departmentHeadType:...
0
votes
0
answers
43
views
Creating scatterplot in R but want the X and Y from same column
I have trade data as shown. The countries and trade direction are not in separate fields, otherwise I think that might be easier. I would like the X axis to be one trade partner and the Y axis to be ...
0
votes
1
answer
148
views
How to compare table structure between two different environments without using db links and not having central repository in an automated manner
How to compare table/columns/index/constraints structure across two different environments in oracle without using db link and not having central repository where data files can be stored.
We cannot ...
0
votes
0
answers
31
views
SikuliX: How to control precision of image matching?
I am new to SikuliX.
I would like to use it to automate testing of dialogs. To do this, I will have SikuliX find() for a dialog on screen, and compare it to a known good image captured of that dialog....
7
votes
1
answer
307
views
Is it possible to define a defaulted comparison operator for a C struct?
I want to use a C struct (termios) in my C++20 program, but I want to be able to compare 2 termios instances.
As there is no default comparison, I tried to define a default comparison operator:
bool ...
-3
votes
2
answers
123
views
What are the arguments of comp for lower_bound() in C++?
I'm trying to create a custom comparison function for the binary search method lower_bound(). I've tried reading the docs and searching, but I can't figure out how the arguments of the comp function ...
-2
votes
2
answers
87
views
PostgreSQL comparisons [duplicate]
I am confused why here the result is TRUE
select 'Clark' in ('Dave', null, 'Clark');
But here it's NULL (instead of evaluating to TRUE)
select 'Ava' not in ('Dave', null, 'Clark');
Can somebody ...
0
votes
0
answers
46
views
Powershell not returning files with a CreationTime "less than" specified DateTime
In PowerShell 5.1, I'm trying to list all files on a given date with a CreationTime between two datetime values:
$fileDate = Get-Date -Date "2024-12-24 00:00:00" #sets the date in ...
2
votes
2
answers
213
views
C++ double type: is comparison by == valid if comparing against the previously set value
What I mean is: I have a situation that I have two fields in the structure of type double, where both may be set there through some evaluation, but in some situations the second of them can be equal ...
2
votes
4
answers
199
views
Can the addresses of two distinct variables of different types compare equal in C?
I'm having difficulties understanding an aspect of Strict Aliasing in C.
As far as I understand, pointers of incompatible types can't be converted between one another. But what about pointer ...
0
votes
1
answer
199
views
Looker - How to Compare today data with last week data but including hours
I need to find out how to compare today data with last week data in lookerstudio.
Example:
Today 01/11/2024 16.00 PM # of order is 2255
Last week 25/10/2024 16.00 PM # of order is 2190
I need to ...
0
votes
0
answers
58
views
In C, why ' ' and not " "? [duplicate]
Apologies in advance to the C masters out there. I'm very new to C and I'm working through an assignment in my course where I need to find words in a block of text.
Here I am trying to compare the ...
-1
votes
1
answer
213
views
Why my c++ code is slower than python code doing same thing?
I'm new to the programming. I've tried to make 3 scripts in Python, c++ and Matlab that would calculate Voltage over Inductor in RL circuit using matrices and finite difference method.
When i ran ...
-3
votes
2
answers
133
views
i want to understand why this comparison isn't working in javascript [duplicate]
i have an if statement in JavaScript, the problem (was its fixed now but I don't know why)
when the parameters are val1 and val2 as objects, this Code works:
if (typeof(val1) === typeof(val2) === '...
0
votes
1
answer
439
views
How I can compare two AWS S3-Buckets, to generate some comparison report
I am having AWS S3 buckets with version enabled.
For each object
Object Key
VersionId , Last Modified , size
Is there any Service available to achieve this report whether data from S3 buckets having ...
0
votes
2
answers
66
views
How to identify the rows of a df1 that have an element contained in a df2 in python?
I have two dataframes that I would like to compare, and I would need to know if the objects stored in df1 are also present in my df2.
However, objects of my df2 are longer because of many additional ...
0
votes
2
answers
93
views
How do I check if multiple returned class objects have the same value for comparison and edit only one, while keeping both for addition later
I'm currently creating a blackjack card game using OOP and the blessed library. As it stands I create the card objects which return a class object to me:
player_card_data = [<blackjack.card.Card ...
0
votes
1
answer
97
views
Comparing dictionary of countries with a column of countries [closed]
I have a dictionary/country list which i took from pycountry (list(pycountry.countries)
I am importing a column from excel called CountryNames
i thought by creating 2 for loops, i could then compare ...
0
votes
0
answers
105
views
Why does my powershell runspace not increase performance?
so basically, i am looking at doing a comparison between accounts we have in Active Directory and a csv which lists all active accounts (~15000 lines). This process would be ran weekly.
The issue that ...
0
votes
2
answers
162
views
Using memcmp() to compare signed bytes [closed]
I am trying to make a flexible mergesort function for primitive data types like char, byte, int, long etc, where the fucntion can take an array of any type and sort it by dividing it based on the ...
0
votes
1
answer
81
views
(the letter) k is the same as f for some reason [closed]
input is a string and well...when input[0] is 'k', its apparently the same as 'f'? like clearly it should be false and not output "f detected" right? k seems to have a value of 107 and f ...
2
votes
2
answers
182
views
In what conditions is one comparison for "if" and "if-else" at С as at assembly?
For x86 assembly the "cmp" instruction sets two flags: "ZF" and "CF", allowing to determine if two integers are equal or greater or less with a single comparison. How ...
0
votes
1
answer
54
views
element-wise comparison (-1/0/1) of collections/IEnumerables, not using default element comparison [closed]
Is there some built-in for comparing collections/IEnumerables element-wise with the possibility to choose comparison for the elements (in case one does not want the default comparison)?
I am not ...
1
vote
2
answers
204
views
Is 0u defaulting to a signed int?
The following code triggers a signed unsigned comparison warning:
uint16 x = 5;
if(((x) & (uint16)0x0001u) > 0u) {...}
Replacing the if with this eliminates the warning:
if(((x) & (uint16)...
0
votes
1
answer
72
views
PySpark DataFrame - Compare multiple Dataframes' Columns with Serial Number Suffix
I am trying to solve a problem but not getting anywhere. Needed help from community.
I can join n number of data frames (all joined dataframes are having same schema). While joining I renamed the ...
0
votes
2
answers
120
views
Is it safe to assume 32-bit floats can be directly compared against each other if value fits the mantissa?
In a leetcode problem about finding if an integer number is sum of perfect squares, using floats instead of ints resulted in more speedup ("perfect-squares" problem). Is it safe to assume ...
1
vote
1
answer
107
views
C# - How to compare multiple nullable values to check if those that have value are equal?
What is the easiest way to check multiple nullable values, to know if those that are not null are equal?
double? a = null
double? b = 2;
double? c = 3.5;
should return false
double? a = 2.5
double? b ...
1
vote
4
answers
129
views
why usage of '&&' operator have different meaning with '=' and with'=='
I was looking at MIT assignments and found this question below link problem 2.5) option B)
Practical Programming in C - MIT (PDF)
Now it says
Assume (x=0,y=0,alliszero=1). alliszero =(x=1) && ...
0
votes
1
answer
72
views
Applescript for batch pairwise comparison of word files
I have a similar situation. I need to perform a large number of pairwise track change comparisons of word files, and the comparison must be done in Word.
I used applescript to perform this, but I'm ...
0
votes
2
answers
54
views
Finding differences and concatenating the differences in pandas
I have two csv files with same column names like this:
File1: (df1)
column1 column2 column3 column4
ABC 100 020 030
DEF 200 040 050
GHI 300 ...
1
vote
3
answers
56
views
R: Find all variables with non-dominated means and variances FAST
I have a set of many random variables, each with a mean and standard deviation. I want to find all variables that are or are not dominated, i.e., that have the highest mean for their standard ...
-5
votes
2
answers
77
views
Compare python dictionaries and find missing elements
I'm encountering a problem, I've been trying for days but without getting any results. I would like to compare 2 dictionaries, in one dictionary there are "Pre match" football matches and in ...
0
votes
1
answer
160
views
Beyond Compare - XML Comparison Issue
I created the below script that is triggered by a separate Python script. This will be a text comparison of 2 XML files.
log normal "C:\Temp\XML_Comparisons\XML_Files_Storage\BCLog.txt"
...
0
votes
0
answers
41
views
Need Help Comparing Text in One Cell To Another
I am trying to develop a program where the end state will be this program finding all instances of similar text within cells from multiple sheets and grouping it together. This question is going to ...
-1
votes
2
answers
1k
views
Pandas alignment error during elementwise comparison [duplicate]
When checking element-wise equality of multiple columns of a dataframe against a single column, pandas raises a ValueError: Operands are not aligned. Do 'left, right = left.align(right, axis=1, copy=...
-2
votes
2
answers
73
views
Trying to understand why my search is not yielding results
So in this case I am working with laravel but it might just be a MySQL "issue". I have a simple database table with only a name field that has two records:
1: B-Front
2: Frontliner
I have a ...
1
vote
2
answers
430
views
Efficiently check for equality of memory blocks in C/C++
I'm interested in the most efficient way to check for equality of memory blocks.
Currently, I use memcmp(...) == 0 to determine if two memory blocks are equal. While this works, memcmp is designed not ...