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
148
votes
9 answers

Android - Snackbar vs Toast - usage and difference

We have been using just Toasts in our application so far and as we are planning to adopt some new features from Support Design Library I am wondering what's the recommended usage for Snackbar vs. Toast. I have been reading on the google material…
Jakub Holovsky
  • 6,543
  • 10
  • 54
  • 98
147
votes
14 answers

Flutter: Find the number of days between two dates

I currently have a user's profile page that brings out their date of birth and other details. But I am planning to find the days before their birthday by calculating the difference between today's date and the date of birth obtained from the…
Asyraf Dayan
  • 2,792
  • 8
  • 26
  • 39
98
votes
5 answers

What are the differences between activity and fragment?

As per my research, there is a significant difference in the concept of backstack and how they exist: Activity When an activity is placed to the backstack of activities the user can navigate back to the previous activity by just pressing the…
Devrath
  • 42,072
  • 54
  • 195
  • 297
94
votes
3 answers

Java: what exactly is the difference between NIO and NIO.2?

I don't quite understand how different they are from each other so I have some inquiries regarding these two packages. After looking around a bit on Google, it seems like Oracle decided to update the NIO package with the newer and enhanced NIO.2…
John Huynh
  • 943
  • 1
  • 7
  • 5
75
votes
14 answers

Android difference between Two Dates

I have two date like: String date_1="yyyyMMddHHmmss"; String date_2="yyyyMMddHHmmss"; I want to print the difference like: 2d 3h 45m How can I do that? Thanks!
D Ferra
  • 1,223
  • 3
  • 12
  • 21
72
votes
2 answers

What are the differences between MPI and OpenMP?

I would like to know (in a few words) what are the main differences between OpenMP and MPI.
elli
  • 1,109
  • 1
  • 13
  • 20
70
votes
1 answer

Package vs Library

I've just started working with CMake and I noticed that they have both a find_package and a find_library. And this confuses me. Can somebody explain the difference between a package and a library in the world of programming? Or, in the world of…
assignment_operator
  • 1,213
  • 4
  • 12
  • 14
67
votes
8 answers

What's the difference between convolutional and recurrent neural networks?

I'm new to the topic of neural networks. I came across the two terms convolutional neural network and recurrent neural network. I'm wondering if these two terms are referring to the same thing, or, if not, what would be the difference between them?
Tal_
  • 761
  • 2
  • 6
  • 13
66
votes
2 answers

What's the difference between Mockito Matchers isA, any, eq, and same?

I am confused on what's the difference between them, and which one to choose in which case. Some difference might be obvious, like any and eq, but I'm including them all just to be sure. I wonder about their differences because I came across this…
Silly Sally
  • 1,027
  • 2
  • 10
  • 15
59
votes
4 answers

Queue vs List

I'm currently using a List as a queue (use lst[0] then lst.removeAt(0)) to hold objects. There's about 20 items max at a given time. I realized there was an actual Queue class. I'm wondering if there's any benefit (performance, memory,…
Jack
  • 5,680
  • 10
  • 49
  • 74
57
votes
6 answers

What is the difference between cross-validation and grid search?

In simple words, what is the difference between cross-validation and grid search? How does grid search work? Should I do first a cross-validation and then a grid search?
Linda
  • 2,375
  • 4
  • 30
  • 33
53
votes
4 answers

What is the difference between SGD and back-propagation?

Can you please tell me the difference between Stochastic Gradient Descent (SGD) and back-propagation?
51
votes
6 answers

Typescript difference between two arrays

Is there a way to return the missing values of list_a from list_b in TypeScrpit? For example: var a1 = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; var a2 = ['a', 'b', 'c', 'd', 'z']; The result value is ['e', 'f', 'g'].
Galma88
  • 2,398
  • 6
  • 29
  • 50
48
votes
4 answers

CV - Extract differences between two images

I am currently working on an intrusion system based on video surveillance. In order to complete this task, I take a snapshot of the background of my scene (assume it's totally clean, no people or moving objects). Then, I compare the frame I get from…
45
votes
1 answer

The difference between head & tail recursion

I'm trying to get the difference between these 2 recursive strategies. The definition I was told is the following: Tail Recursion: A call is tail-recursive if nothing has to be done after the call returns i.e. when the call returns, the returned…
Scarl
  • 950
  • 5
  • 16
  • 31