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
23
votes
2 answers

What is the difference between a Confusion Matrix and Contingency Table?

I'm writting a piece of code to evaluate my Clustering Algorithm and I find that every kind of evaluation method needs the basic data from a m*n matrix like A = {aij} where aij is the number of data points that are members of class ci and elements…
MangMang
  • 427
  • 1
  • 5
  • 17
23
votes
5 answers

Python find numbers not in set

I have a range of numbers such as 1-100. And I have a set that holds all, or a random subset of numbers in that range such as: s = set([1,2,3,35,67,87,95]) What is a good way to get all of the numbers in the range 1-100 that are not in that set?
Chris Dutrow
  • 48,402
  • 65
  • 188
  • 258
23
votes
4 answers

Why do WPF Applications look different between Windows 7 and Windows 8 and can this be fixed?

I'm really surprised that this question does not appear to have been asked yet... if it has, but I just couldn't find it, apologies. Ok, so my work computer has just been upgraded from Windows 7 to Windows 8. To my absolute horror, my WPF…
Sheridan
  • 68,826
  • 24
  • 143
  • 183
21
votes
4 answers

What is the most efficient way to compute the difference of lines from two files?

I have two lists in python list_a and list_b. The list_a have some images links, and the list_b too. 99% of the items are the same, but i have to know this 1%. The all surplus items are in list_a, that means all items in list_b are in list_a. My…
Vinicius Morais
  • 565
  • 1
  • 5
  • 22
20
votes
1 answer

Python finding difference between two time stamps in minutes

How i can find the difference between two time stamps in minutes . for example:- timestamp1=2016-04-06 21:26:27 timestamp2=2016-04-07 09:06:02 difference = timestamp2-timestamp1 = 700 minutes (approx)
Shubham Jairath
  • 382
  • 1
  • 4
  • 14
20
votes
1 answer

Differences between MOG, MOG2, and GMG

What's the difference between these 3 methods of background subtraction?
CubbyBluePen
  • 251
  • 1
  • 3
  • 7
19
votes
7 answers

Find difference between two strings in JavaScript

I need to find difference between two strings. const string1 = 'lebronjames'; const string2 = 'lebronnjames'; The expected output is to find the extra n and log it to the console. Is there any way to do this in JavaScript?
Elvis S.
  • 362
  • 1
  • 3
  • 13
19
votes
1 answer

How to handle iterator::difference_type when you have no way of measuring the difference?

I'm writing a C++ wrapper for a 3rd party C library. The library provides some functions for iterating through a series of objects. I want to write an iterator to wrap this behaviour so iteration is easier, but I cannot think how I will be able to…
Pharap
  • 3,826
  • 5
  • 37
  • 51
19
votes
3 answers

Get the minutes that have elapsed through moment diff

I'm trying to get the difference in minutes between two timestamps I have a timestamp that looks like this to begin with '15:44:06' And when I want to find the time elapsed I create a new moment timestamp var currentTimestamp = Moment(new…
Jordan
  • 2,393
  • 4
  • 30
  • 60
19
votes
3 answers

What is the difference between a flow chart and a UML activity diagram?

I know that an activity diagram is: More simple; More standardized; Support concurrent flows. compared to a flow chart. But what are the possible reasons for using an activity diagram instead of a flow chart apart from those mentioned above?
yelo
  • 371
  • 1
  • 5
  • 17
19
votes
1 answer

Ruby on Rails: difference between .html_safe and sanitize()

I have two pieces of code in my view: <%= sanitize('

winter

') %> <%= '

winter

'.html_safe %> And they both seem to result in encoding html tags in a string provided. What is the difference between them and when should I use either?
Evgenia Karunus
  • 10,715
  • 5
  • 56
  • 70
19
votes
2 answers

The difference between simpleCV and openCV

I don't know which one to use. which is the best one actually ??? Or else, are both of them the same ??? In some article, I read that simpleCV is sort of an interface which gives you access to openCV. I don't understand that point. Then why do we…
Prasadika
  • 897
  • 2
  • 20
  • 36
19
votes
6 answers

Real difference between AsyncTask and Thread

I have been reading Android documentation (AsyncTask, Thread) and vogella tutorial about this matter, but I have doubts yet. For example, I want to send a message from an Android app to a server. And I would like this process to be responsive. What…
18
votes
4 answers

What is the difference between keras and tf.keras?

I'm learning TensorFlow and Keras. I'd like to try https://www.amazon.com/Deep-Learning-Python-Francois-Chollet/dp/1617294438/, and it seems to be written in Keras. Would it be fairly straightforward to convert code to tf.keras? I'm not more…
eugene
  • 39,839
  • 68
  • 255
  • 489
18
votes
5 answers

What is the difference between uniform-cost search and best-first search methods?

Both methods have a data structure which holds the nodes (with their cost) to expand. Both methods first expand the node with the best cost. So, what is the difference between them? I was told that uniform-cost search is a blind method and…