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

What is the difference of {$var} vs '(string)'.$var.'(string)' in PHP

What is the difference of these two (in the title)? The first is the use of {$var} vs the use of 'string here'.$var.'another string' Example of {$var}: Example of 'string'.$var.'string again':
0
votes
1 answer

calculate difference in dates, get difference in hours mins and seconds - ideally by js, otherwise moment.js

I've managed in calculating date differences by: converting unix date received into js date, Saving current date as js date, passing both to moment.js together with their format to get diff converting to milliseconds difference in ms is converted…
Joe Borg
  • 65
  • 2
  • 12
0
votes
0 answers

How to use wdiff view the difference between two files while ignoring whitespace including newlines?

I reviewed the manual for "diff" and it says: For many other programs newline is also a white space character, but diff is a line-oriented program and a newline character always ends a line. Hence the -w or --ignore-all-space option does not…
JobHunter69
  • 1,706
  • 5
  • 25
  • 49
0
votes
1 answer

How do I subtract two arrays of cells in Matlab

I am trying to get some variables and numbers out from an Excel table using Matlab. The variables below named "diffZ_trial1-4" should be calculated by the difference between two columns (between "start" and "finish"). However I get the error:…
Spica
  • 127
  • 2
  • 10
0
votes
1 answer

How to prompt user for two dates and output date difference in YY, M, DD?

I have been searching for a clarified answer on this. I have read many threads and other websites about using datetime, but how can I build a simple program that prompts a user for two certain dates, and then calculate the difference between those…
0
votes
2 answers

How to find similar results in SQL Server?

I have these items in my DB: Harry Potter and the Chamber of Secrets Harry Potter and the Deathly Hallows: Part 1 Harry Potter and the Deathly Hallows: Part 2 Harry Potter and the Goblet of Fire Harry Potter and the Half-Blood Prince Harry Potter…
Amir
  • 47
  • 8
0
votes
3 answers

Pointer arithmatic failed to compile, gcc says invalid type conversion

I wish to calculate the distance between a program's bss section and the start of heap section, so I've got a program like this: $ cat 1.cpp #include #include #include int empty;//bss int main() { …
Troskyvs
  • 7,537
  • 7
  • 47
  • 115
0
votes
1 answer

What Data Structure is best suited to store differences

I have a set of pre defined properties I want to store. For example: PersonNr,Gender,Name,Surname, Address, Zip,City. Now I have different sources for these data sets, which share the PersonNr but have different value for the other…
Anh Tuan Nguyen
  • 971
  • 3
  • 13
  • 28
0
votes
1 answer

questionnaires filled on the same day

I am working with a data set with multiple questionnaires which were supposed to be filled in on different timepoints i.e. 173 9/13/2013 10/29/2013 9/26/2014 174 10/21/2013 11/25/2013 11/3/2014 175 7/1/2014 …
Z.Chanell
  • 35
  • 8
0
votes
1 answer

Adding a difference or sum column within SQL that has pivot?

This is in SQL Server. I'm looking for a way to add a column to subtract column 201601 from 201602. IE if after the program is run, 201601's tranamt is 10,000 and 201602's tranamt is 11,000, I want a column that will yield 1,000 to appear next to…
SQLISHARD
  • 87
  • 1
  • 9
0
votes
1 answer

Date difference not calculating correctly in php

I am using the following code to get the difference between two dates. I'm having issues with it returning the correct amount of days left. 3451 ) ); $currentdate =…
Matthew Barraud
  • 467
  • 1
  • 5
  • 17
0
votes
0 answers

Reset count when calculating the difference between two rows in SQL

This is the code that I currently have. Which calculates the difference between the first value in comment karma and the next value. Same thing for link karma. I need the count to restart when a new author is displayed. That is the part that I can't…
brad23
  • 1
  • 1
0
votes
1 answer

sqldf query with date difference

I am trying to perform a (simplified!) query on colour and date differences on the following two databases (extract): A B A.COL A.TIME B.COL B.TIME 1 blue 2009-01-31 1 blue …
user3032689
  • 627
  • 1
  • 10
  • 23
0
votes
1 answer

Find difference between two tables in SQL Server

I have this query that returns 27074 rows from the source table: SELECT [DOC NO] ,[LineNumber] ,[SHEET] ,[TestPkgNo] ,[ITEM CODE] FROM [excel].[dbo].[MTO2] And this one (second table ) SELECT DocumentNumber,…
Ehsan Akbar
  • 6,977
  • 19
  • 96
  • 180
0
votes
2 answers

python time lags holidays

In pandas, I have two data frames. One containing the Holidays of a particular country from http://www.timeanddate.com/holidays/austria and another one containing a date column. I want to calculate the #days after a holiday. def compute_date_diff(x,…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
1 2 3
99
100