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
0 answers

Excel perform calculation when difference between cells matches certain value

Task: I have a column of frames (1, 2, 3,...) and a column of time elapsed (33.835, 59.944, 85.267,...)ms. I would like to count the number of frames every second, i.e. average FPS.   Attempt (vague pseudo code): Start at cell B2, move down a cell…
0
votes
2 answers

difference between value and second value

I have this kind table in SQL Server 2014: event_type | value | time ------------+------------+-------------------- 2 | 5 | 2015-05-09 12:42:00 4 | -42 | 2015-05-09 13:19:57 2 | 2 …
Darko Milic
  • 189
  • 3
  • 13
0
votes
3 answers

time difference Am I doing it right?

I am trying to measure time difference I am also learning to wright PHP.. I am saving time and date into SQL as datetime by: $now = new DateTime(); $datenow = $now->format('Y-m-d H:i:s'); $sql = "INSERT INTO Logg ( logdate , Log , value)…
Bergum
  • 77
  • 9
0
votes
2 answers

How to calculate difference between keys and values in php

I have two types of arrays: 1: $array1["a"][] = "value1"; $array1["a"][] = "value2"; $array1["b"][] = "value3"; 2: $array2["0"] = "a"; What I need now is to somehow find difference between these two arrays. I need to filter out array1 by key,…
Marius
  • 119
  • 8
0
votes
0 answers

how to highlight json difference in php or js

I have two json data: $old_data = '{"stock_id":"583", "stock_date":"2017-03-11", "stock_quantity_in":"0", "stock_note":"moved to warehouse A}'; $new_data = '{"stock_id":"583", …
nemuroito
  • 179
  • 2
  • 2
  • 11
0
votes
2 answers

Using input type "Date" to find the difference between two dates

I'm very curious as to why my code won't run properly. I retrieve the value for the Date input from the html file and I created a function to find the difference; however, the span element will not update. Please explain to me why I'm wrong and what…
user6906805
0
votes
1 answer

cakephp get old and new record in edit page

CakePHP 2, I have an edit page. I would like to see what has been changed. Therefore, i need to get $this->request->data. However, it fails to get the old record (non-edit) and new record (edited). How can I do it? Please public function…
0
votes
1 answer

pandas DF column max difference between pair of values recursively

I have a DataFrame with a column 'col1' with integers in it. The DF may have anything from 100 up to 1mln rows. How to compute difference between pair of values in the col1 such as: row2 - row1 row3 - row2 row4 - row3 etc and return max difference?…
user5892612
0
votes
0 answers

Python/Pandas: Length of a .csv file exported from a dataframe is different from the length of the dataframe

I have imported a .csv file using df=pandas.read_csv(.....). I calculated the number of rows in this dataframe df using print(len(df)) and it's size had some 30 rows less than the originally imported file. BUT, when I exported df directly after…
cph_sto
  • 7,189
  • 12
  • 42
  • 78
0
votes
3 answers

Finding the difference between rows of columns using shift

I've been coming here for almost two years now and have always been able to figure things out but I'm stumped now. Hopefully this is a quick…
0
votes
1 answer

Haskell. How to calculate the difference between two lists of string?

I have a question that can be described as this situation. There are three different categories of books: Medical book, Art book and History book. Each book has three level: Elementary, Intermediate, Advanced. These books will be put on…
Clark16
  • 73
  • 4
0
votes
0 answers

Need difference in two series of a graph at every time stamp when they are plotted with two csv files

I have two csv files ,where I plot two series using the matplotlib in python. File 1.csv 0.1,2 1.2,3 2.1,1 3.2,4 4.1,3 5.3,6 6.2,5 7.5,3 8.3,2 9.4,6 File 2.csv: 0.2,3 1.1,3.2 2.0,1.3 3.1,4.4 4.3,3.5 5.2,6.1 6.2,5.5 7.4,3.6 8.1,2.5 9.2,6.7 and I…
vijay
  • 151
  • 1
  • 1
  • 8
0
votes
3 answers

Date from string is not coming properly and two dates difference also using Swift 3?

I have a date in string format, example:- "2017-07-31" or can be multiple dates (any) in string format. My requirement is to check this date to current date and if it is greater than 0 and less than 15, then that time I have to do another…
Kishor Pahalwani
  • 1,010
  • 1
  • 23
  • 53
0
votes
1 answer

Finding smallest differences of values of txt files

I want to match the values of a specific column of a txt file named A with 10 other txt files named (A_1,A_2......A_10) and find the sum of square of differences for each txt files. So, basically, i want Python to print out the 3 smallest…
Hrihaan
  • 275
  • 5
  • 21
0
votes
1 answer

Skipping over a specific value when comparing

I have 10 txt files named A_1,A_2.......A_10 and I want to compare it with a txt file named A. My goal is to find the sum of differences between values of a specific column,but the problem is both in the 10 txt files(A_1,A_2.....A_10) and in A,i…
Hrihaan
  • 275
  • 5
  • 21