Questions tagged [difference]

This tag may refer to 1) the difference between two numbers (i.e. the difference between 5 and 10 is 5) or 2) the things that two or more particular objects do not share in common.

Use this tag for questions that deal with either of the following two topics:

  1. The difference between two numbers.
  2. What two or more particular objects do not share in common.

Related tags:

1970 questions
0
votes
3 answers

Creating a new array by summing/subtracting characters of two strings

Starting from 2 arrays of bytes, S1 and S2, there should be created a third array, based on the following rule: on the even positions should be the sum of the specific characters from S1 and S2, on the odd positions should be difference of the…
Katrin
  • 57
  • 7
0
votes
1 answer

Percentage change according to input

Is there any way to write a code That whenever the input is different the percentage changes So for example If input is 100 the percentage is 50/50 If input if 90 the percentage is 60/40 If input is 80 the percentage is 70/30 And so on? Thank…
user9115295
0
votes
0 answers

comparing two maps using guava,getting error The method difference(Map, Map) is undefined for the type Maps

I am comparing two maps using guava,but while comparing I am getting below error for the last line of code snippet. The method difference(Map, Map) is undefined for the type Maps code snippet: import com.google.common.collect.MapDifference; import…
MayurW
  • 19
  • 3
0
votes
1 answer

Recursively compute difference between consecutive records within each group

Goodmorning StackOverflow, I have seen answer to similar question, however, they do not consider the group_ID and are not efficient enough to be run on massive datasets. I am struggling to find a solution to the following task: within the…
Seymour
  • 3,104
  • 2
  • 22
  • 46
0
votes
2 answers

Highlight difference between two step data (derived from histogram) in R

:-) I have two datasets where I derived histogram data from. These are both saved in two seperate arrays. The current sourcecode can be found below, along with the current plot. # DEMO file for the awesome stackoverflow community require(plotrix) #…
AndreH
  • 19
  • 4
0
votes
2 answers

Calculate total experimental time for each sample

I am trying to calculate cumulative time between experiment initiation and each temperature measurement I made during an experiment. My experiment has 50+ samples (i.e. A1,A2,B1,B2 ect) and each sample was initiated at a different time/day. I want…
Alissa R
  • 3
  • 5
0
votes
1 answer

Difference between get_variable and model_variable function?

In this answer I got to know the difference between the Variable and the get_variable but I encounter one more method to get or create a variable that is model_variable, then I am confused when to use get_variable and when to choose…
0
votes
1 answer

Comparing big numbers in Haskell to pass quickCheck

I have made a function that calculates the definite integral of some function g from a to b using the trapezoidal rule with n number of trapezoids. i.e. definiteIntegral (-4) 5 (\x -> x) 5 = 4.499999999999998 I need to develop a quickCheck function…
0
votes
1 answer

Compare Two dataframes add mis matched values as a new column in Spark

Difference between two records is: df1.except(df2) Its getting results like this How to compare two dataframes and what changes, and where & which column have changes, add this value as a column. Expected output like this
Venu A Positive
  • 2,992
  • 2
  • 28
  • 31
0
votes
2 answers

How do you dynamically create difference- or delta- columns in a data.frame?

My dataframe has column names of outstanding balance from Balance, Balance1, Balance2,...,Balance36. I want to add a column for the delta between each month, i.e. Delta2 = Balance2 - Balance1 How can I simplify by method below. dataset$delta1 =…
Adam
  • 473
  • 5
  • 21
0
votes
3 answers

Is there any difference between the terms line of code and statement?

Is there any difference between the terms 'line of code' and 'statement' in programming languages?
0
votes
0 answers

Exclude Datetime Weekend (Saturday and Sunday) from Difference (Interval) between two Datetime

I have this code: No data!'; } else { $no = 1; $i=0; while($data = mysql_fetch_assoc($query)){ $datetime1 = new…
user8892010
0
votes
1 answer

Python Dataframe: Remove timestamp from calculated Days field

I calculated a column using the following code: df_EVENT5_5['age'] = dt.datetime.now().date() - df_EVENT5_5['dt_old'] df_EVENT5_5['age_no_days'] = df_EVENT5_5['age'].dt.total_seconds()/ (24 * 60 * 60) The output column contains the…
PineNuts0
  • 4,740
  • 21
  • 67
  • 112
0
votes
1 answer

XML files having numeric entities doesn't recognize tags

I am working on some XML files to parse some data. In one XML file, the content is like 100 bob
0
votes
2 answers

Finding number of HH:MM between two different dates in SQL

I am creating a turnaround time report in SQL for my job and need to be able to calculate the number of HH:MM between two different dates taking into account the DAYS as well as the HOURS. I seem to find a lot of answers that will bring back just…