1,995 questions
-3
votes
0
answers
24
views
How to calculate difference between two date/time stamps, in specific format (YYYYMMDD.HHMMSS.MS), with labeled output, in batch file [closed]
Yes, unfortunately, the solution has to be a batch file due to the age of the system (Windows 2000 - no PowerShell). Additionally, since I have no experience with batch language (for lack of a better ...
0
votes
0
answers
32
views
Creating a Line graph & Matrix showing % Difference from Previous Year, allowing for a filter on "Country"
I have raw data with columns "Year", "Period", "Country", "Sales Amount". Please note there are 13 periods in a year, (and not 12). The dates also differ ...
0
votes
1
answer
99
views
What is the appropriate terra-based method to summarize the difference between rasters with different spatial extents?
The terra code I'm using to summarize the difference between two rasters, each with a unique spatial extent, is producing unexpected results. In short, the output matches the spatial extent of the ...
3
votes
1
answer
84
views
R. Contrasting predicted means in R survey package with splines
In the R "survey" package the svyglm() function can be used with svypredmeans() and svycontrast() in order to compare predictive marginal means for a generalised linear model. This works ...
1
vote
3
answers
88
views
How to get difference value (delta) between to rows after query in Mariadb
Helo,
this is my query:
MariaDB [PV_Anlage]>
SELECT created_at, verbrauch_ges
FROM pv_metrics
group by DATE(created_at)
ORDER BY ID DESC limit 20;
+---------------------+---------------+
| ...
4
votes
3
answers
150
views
How to tell if two arrays contain the same elements [duplicate]
Following are two arrays of strings
arr1=("aa" "bb" "cc" "dd" "ee")
echo ${#arr1[@]} //output => 5
arr2=("cc" "dd" "ee&...
3
votes
0
answers
64
views
Monthly/quaterly data when using did_imputation in R
I am using the did_imputation package in R for the Imputation Estimator from Borusyak, Jaravel, and Spiess (2021). I suspect to have some issues regarding the formatting of my variables, especially ...
0
votes
1
answer
143
views
The results of using Eigen to calculate matrix in C++ are different on Linux and Windows platforms
I use Eigen to calculate the rotation matrix and run the same C++code on both Linux and Windows platforms as follows:
void testEigen()
{
Eigen::AngleAxisd xRot(0.0, Eigen::Vector3d::UnitX());
...
0
votes
0
answers
59
views
Comparing hash of a file in git index versus git working directory is inconsistent
I have a git repo with the same file called fileA in two different paths : locationX and location Y.
I am trying to ensure that these two files are identical and if they do/do not match what's been ...
1
vote
1
answer
99
views
Calculate the difference between successive observations rowwise in a dataframe
I have this hypothetical dataframe
df<- data.frame(a_13=c(NA, 1, 2),
a_12=c(NA, 4, 3),
a_11=c(NA, 2,NA))
df
a_13 a_12 a_11
1 NA NA NA
2 1 4 2
3 ...
0
votes
1
answer
130
views
How to calculate difference between 2 columns in power bi table visualization
I have a table visualization created in power BI dashboard and it has 3 columns. I want to find the difference between col1 and col2 and display as diff. I have written a measure but it is giving me ...
0
votes
0
answers
51
views
The difference between math.trunc() and int() in python [duplicate]
what is the difference between math.trunc() in math module and the int function in python both of them return remove the fractional part of a number and I think it has some reasons that python let ...
0
votes
1
answer
124
views
Calculation of the current month value from the running total column (reset every year)
I have a table like this:
I want to calculate the current value of a single month in another column as the difference between this month and previous (grouping by "group"), except January ...
1
vote
1
answer
192
views
Delphi EncodeDateTime and EncodeTime Time portions are different
Here is an example which demonstrates the problem:
var
fdt, fndt : Double;
dt, dt2 : TDateTime;
begin
dt := EncodeDateTime(2023, 12, 31, //
20, 10, 5, 100);
dt2 := EncodeTime(20, ...
2
votes
1
answer
87
views
Compare strings from a very large text file (over 100 GB) with a small text file (about 30 lines) and print all the strings contained in both files
I have two text files. One contains a very long list of strings (100 GB), the other contains about 30 strings. I need to find which lines in the second file are also in the first file and write them ...
0
votes
1
answer
118
views
SQL max function leetcode 626
In Leetcode 626. Exchange Seats
I write
Select
(case
when id%2 != 0 and id = (select max(id) from Seat) then id
when id%2 =0 then id-1
else id+1 end) as id,
student
...
-2
votes
2
answers
65
views
Python script to print only the difference between two text files [closed]
I was looking for some help to write a Python script to print only the difference and not anything extra in the output.
For example:
Contents of File1 :-
['Tom','Joe','Kim']
Contents of File2 :-
['...
0
votes
1
answer
61
views
compare 2 arrays with different sets of elements and get the difference
I have 2 arrays similar to below structure. I want to compare each field and then store the array item which has a difference into a third array.
Arr1= [{ state:CA, id:1, name:aaa, product:car, color: ...
0
votes
0
answers
150
views
Correct way of using cross-correlation to find time difference between 2 sine waves
I'm not a software engineer nor a hardware engineer, but I've been trying to learn some signal processing algorithms to apply to my project.
I want to use cross-correlation to find time difference ...
0
votes
0
answers
49
views
Compare bit bucket branches and see differences that should not be seen
I have the following branches
uat
prep
prod
I have same code in all 3 branches.
When I compare UAT as Source and PREP as Destination, bitbucket shows no differences.
however, If I compare UAT as ...
-3
votes
1
answer
66
views
How do i calculate difference between counts for each value in Excel
I counted the total number of each product in table1. Then, I need to differentiate Delivered and Pending products in the total count.
For Total count of each product i used:
=COUNTIF($B5:$B17,E5)
...
0
votes
1
answer
63
views
How to find the percentage change of two graphs
I have two graphs and would like to find the difference between them in percentage.
First I converted them into lists:
Graph_1=[3843.788185, 3734.256494, 3572.574207, 3420.958554, 3254.79344, 3008....
1
vote
1
answer
57
views
How to calculate the percentage of change on rows with NA
How do I find and calculate the percentage of change of an indicator throughout time when there are several NAs spread throughout the data?
Let's assume that this is my dataframe:
a b c d ...
0
votes
1
answer
337
views
Problems with add_difference() in gtsummary
I have this df
df
# A tibble: 248 × 2
asignado mxsitam
<chr> <chr>
1 Control No
2 Control No
3 Intervencion No
4 Intervencion Si
5 ...
0
votes
2
answers
165
views
Find some better algorithm for finding the smallest difference between the elements of an array
Input: Array of integers A[0..n – 1]
Output: Smallest difference between two elements of a dmin array
dmin = ∞
for i = 0 to n − 1 do
for j = 0 to n − 1 do
if i != j &&|A[i] − A[j]| &...
0
votes
0
answers
59
views
Extract difference between slightly misaligned images with ImageMagick
I have 2 screenshots from a video game, of a person's gloves and a knife. The knife and the background are identical, while the gloves are different. I want to get the different part between the ...
0
votes
0
answers
26
views
Dropping rows that do not match values from another column
I've got two dataframes that I am comparing however they are different in length. I want to compare the values from the reference column that exist in both dataframe and drop the rows that do not ...
0
votes
2
answers
70
views
how to difference values within several panels
Suppose the data is:
data <- structure(list(country = c("Poland", "Poland", "Poland", "Poland",
"Poland", "...
0
votes
3
answers
60
views
How to select result which calculates difference between two tables then display it along a third table?
Regarding db fiddle
Table: items
id
name
1
bolt
2
wrench
3
hammer
Table: inwards
id
item_id
quantity
1
1
10.00
2
2
8.00
Table outwards
id
item_id
quantity
1
1
5.00
I want to SELECT table items with a ...
0
votes
1
answer
58
views
Python Pandas: Find the difference of two dataframe
import pandas as pd
a = [0.0, 0.6900000000000001, 1.3800000000000001, 1.3800000000000001, 2.0700000000000003, 2.7600000000000002, 2.7600000000000002, 3.45, 4.1262, 4.140000000000001, 4....
-1
votes
2
answers
123
views
MySQL Query for Spread/Difference of Energy Counter and missing Value interpolation
I have an energy counter (kWh) recorded in a MySQL database every 15 minutes.
Sometimes the recording fails for several reasons (power outage, computer reboot for updates...) and values are missing.
...
0
votes
2
answers
93
views
removeAll function removes more than expected
I have the following functionality that I’ve seen people use in order to get
the differences between two lists.
Note: this is not the actual code but a representation of what I have, in actuality each ...
-1
votes
2
answers
75
views
What are the differences between these two function? They look the same [duplicate]
I am a newbie of Rust. There are two function here. When I compile, foo1 compiles pass and foo2 displays an error. But they only add an irrelevant parameter to foo1 compared to foo2, what is the ...
-1
votes
1
answer
38
views
Difference between class component and function component in reactjs
Difference between class and function components in reactions?
Working and use of both components and when to use them. And also explains when to use which component that completes our programming ...
-3
votes
2
answers
606
views
How to identify changed property values when comparing two nested data structures? [closed]
I'm working on a TypeScript project where I need to compare two objects with potentially nested structures and identify the fields that have changed between them. For instance, consider an old object ...
0
votes
1
answer
97
views
Find cases of abrupt changes (value differences) within a certain time span with R
I have a multi-annual temperature time-series with a datetime column (with irregular time steps) as such :
daytime Temperature
<dttm> <dbl>
1981-10-01 ...
1
vote
2
answers
95
views
Dataframe - difference of rows by some style
I want the difference of column 'position' by the column 'Seg' with 'x' adjacent.
import numpy as np
import pandas as pd
mydict = {'position':['0.0', '0.433', '2.013', '3.593', '5.173', '6.753', '6.9']...
0
votes
2
answers
89
views
Count then calculate differences from first and previous rows after grouping, but ignoring text/character values in r
From the following data grouped by id and visit, which include a mix of numeric and text/character values, how to create these 3 new columns:
count_wotxt: count by id and visit but without ...
2
votes
1
answer
48
views
first Quarter current Quarter difference
Iam fairly new to DAX and for that reason studying to catch more routine. Having problem trying to resolve. Am trying to count difference between first and the current Quarter.
start Q current Q diff =...
-1
votes
1
answer
193
views
About making animation by VMD(Visual Molecular Dynamics)
~Details~
I have a file.pdb that contains 10 frames but each frame don’t have same data size(ex. frame1 has 10 atoms, frame2 has 20 atoms….).
I need a way to make animation of this file, but VMD ...
0
votes
0
answers
46
views
Calculating all possible differences of observations in R
I have the following data frame and
# Create a dummy dataframe
dummy_df <- data.frame(
observation = as.factor(rep(1:4, each = 3)), # Factor from 1 to 4, repeated for each species
species = rep(...
1
vote
2
answers
821
views
what difference of hashSetOf() and mutableSetOf() method in kotlin
when or where use hashSetOf() or mutableSetOf() method in kotlin or what difference of these?
I know the hashSetOf() or mutableSetOf() are the mutable but in programming when or where we use them.
val ...
0
votes
0
answers
83
views
How do I calculate the time difference between two datetimes in excel and then get the average time?
I have a dataset that I download from an application (no movement in changing the format of data)
**Created Date | Reviewed Date**
2023-10-25T09:55:47 | 2023-10-28T10:23:56
2023-10-25T09:55:47 ...
0
votes
1
answer
58
views
CLS tool is failing? data does not match
I am trying to improve the website that I am in charge of, but using the Page Speed tool https://pagespeed.web.dev/ shows me that the CLS for desktop is already 0 (zero) and in the Above it shows me ...
0
votes
1
answer
108
views
Quantify confidence on a difference between two groups [duplicate]
I am looking to quantify certainty/confidence on a difference between two groups (see toy dataset):
# Create dataframe
df<-data.frame(
Age=c(40,40,40,40,41,41,41,41),
Strength=c(50,49,46,46,...
0
votes
1
answer
68
views
Getting difference for variable per year
I would like to get the difference for consecutive years in a data frame like this:
group year value
------------------
1 2017 10
1 2018 20
1 2019 25
2 ...
0
votes
2
answers
75
views
Difference between two row values within the same column based on value in third column in R
[Expected Table][1]Thanks for looking into this post.
Trying to find difference between the "Record" value based on baseline visit in R(for spotfire)
For RecordId(10001), Change in Record ...
-1
votes
1
answer
618
views
Gap and Island Grouping
For my source table I have all the “Contact history for customers” in the correct order (ascending starting from earliest date at the top). What I need to do is group rows where the contacts are ...
0
votes
1
answer
373
views
BACI design: How to account for the difference in Before-After Control?
I ran a BACI experiment looking at the effect of artificial light at night on fish reproduction, and one of our response variable is the yolk area in their eggs. My raw data looks like the attached ...
3
votes
3
answers
2k
views
`\dg` vs `\du` in PostgreSQL
I showed users(roles) with \dg and \du, then there were the same results as shown below:
postgres=# \dg
List of roles
Role name | Attributes
------...