# Questions tagged [difference]

832 questions

1

266

Views

### relation between random testing and fuzz testing

I am wondering what the relation between random and fuzz testing is. I understand that random testing has been there for a longer time, but I cannot see any differences between them. They both seem to make use of random input to see if the program goes into an unexpected state (i.e. crash). Is the m...
Martin Jü

2

2.4k

Views

### Python sets: difference() vs symmetric_difference()

What is the difference between difference() and symmetric_difference() methods in python sets?
Anja

1

36

Views

### Pandas: Calculate the difference between all rows and a specific row in the dataframe

Hi I have data in the following format: A B 0 2 1 1 2 1 2 2 4 3 2 4 4 3 5 5 3 5 6 3 6 7 3 6 I want to calculate the sum of absolute differences between index 0 and all the other indexes. This means that I will calculate the difference on every column. Take the absolute value and sum...

3

3.3k

Views

### Prolog lists difference

I'm trying to make program in prolog that will do something like this: diffSet([a,b,c,d], [a,b,e,f], X). X = [c,d,e,f] I wrote this: diffSet([], _, []). diffSet([H|T1],Set,Z):- member(Set, H), !, diffSet(T1,Set,Z). diffSet([H|T], Set, [H|Set2]):- diffSet(T,Set,Set2). But in that way I can only get e...

0

22

Views

### Snazzymaps - Pointers are not being placed properly when zooming

I have a problem that makes 2 pointers not being placed properly. Normal without zooming Different placement when zoomed I do have to use Snazzymaps for this. This is the code (without styling): {name: 'KOV'}); var twee= {lat: 52.345975, lng: 6.655401}; var een= {lat: 52.366489, lng: 6.670262}; var...
Leandro

2

52

Views

### eliminate dates that are not within a certain amount of days of the previous date (R)

I have a data frame in R called info which includes several dates under the column Date, they are ordered in '%Y-%m-%d' I want to only have those values that are less then 6 days apart and remove the 'outliers' anyone know how this can be done? what the data frame looks like '> info Date ens seps...
Judith

1

41

Views

### Difference on iPhone and Android, css

How come my webdesign looks so different on iphone and android. All my elements match up exactly as i want them on android, but wrong on iPhone, even though i'm using Chrome as browser on both? I even designed the site from iPhone proportions using google dev tool, and yet it fits android better th...
Green

1

66

Views

### weird output of dplyr::SETDIFF in r

I am trying to use setdiff function in dplyr, on these two dataframes: t1

1

66

Views

### Check if there is only 1 character difference between two strings in PHP

I'm trying to figure out how to calculate whether the difference in two strings is exactly 1 character (or lack of it) The function should cover the following cases: STRIN1G / STRIN2G ONE TOO THREE / ONE TWO THREE NATALI / NATALIE ASTRING / STRINGB The levenshtein function (where you would check if...
Dino Cagalj

1

153

Views

### Is Monte Carlo Tree Search policy or value iteration (or something else)?

I am taking a Reinforcement Learning class and I didn’t understand how to combine the concepts of policy iteration/value iteration with Monte Carlo (and also TD/SARSA/Q-learning). In the table below, how can the empty cells be filled: Should/can it be binary yes/no, some string description or is i...
Johan

2

49

Views

### Error when running my php script

I have these errors when running my script. failed to open dir: No such file or directory in /Applications/MAMP/htdocs/sites-store/word/word2.php on line 6 Warning: scandir(): (errno 2): No such file or directory in /Applications/MAMP/htdocs/sites-store/word/word2.php on line 6 Warning: array_diff()...
cachess

2

78

Views

### Excel VBA Calculating difference between two cells + adding characters if difference is exceeded

So I've looked far and wide for anything similar and all other people's issues seem to be with numbers in neighboring columns. I'm trying to clean up a spreadsheet for my company that was created ages ago. The girl doing the data entry on it has very little Excel knowledge and is used to things bein...
runriot

1

36

Views

### Show datailed differences for two csv files with bash or awk

I need your advice about a situation I have comparing two cvs files in bash: file1.csv 300000493|300000323|300000323|300000000|2|0|12619|0|0|+000000000000043.000|15|0|49300|1|42|4 300315830|300315830|300000419|300000000|2|0|12619|0|0|+000000000004020.000|18|0|31583000|89|43|4 300000493|300000323|300...

0

63

Views

### InfluxDB - query with aggregation function DIFFERENCE() that returns value from other query

I have a atble in InfluxDB, which has some values. So what I wanted to do is that I wanted to calculate the difference changing with values. Here is my query: SELECT * FROM (SELECT DIFFERENCE(value) FROM table) WHERE difference = 1; And I wanted to select all values from the table, where detected di...
Anzoman

2

30

Views

### I get different results in excel and mssql about difference in hours between two particular date

I have two particular days in DB and I want to calculate the difference in hours of this two days.This is the sample; stardate = 01.06.2018 02:00:51 and finisdate = 01.06.2018 03:37:00 and in MSSQL I used this query CAST( ROUND(CAST(BitisTarihi-BaslangicTarihi as float)*24,5,0) as numeric(18,5)...
ihsan.endustri

1

385

Views

### How to properly use ThreeTenABP to get the time in milliseconds between two dates based on UTC

I'm using this library I just discovered which is supposedly less heavier than Joda time for android and I said what the heck, let's use it. But now I'm struggling to find any good examples on the web about how to use it, besides these two methods I have: // ZonedDateTime contains timezone informat...
Johnny boy

1

51

Views

### filter from array with multiple value php

\$tick = file_get_contents('https://api.coinmarketcap.com/v2/ticker'); \$data = json_decode(\$tick, TRUE); var_dump(\$data); result of \$data when filter by this code : if(\$key == 1027) \$me=\$value; array (size=10) 'id' => int 1 'name' => string 'Bitcoin' (length=7) 'symbol' => string 'BTC' (length=3) 'we...
puriya

2

140

Views

### Python Pandas groupby and join

I am fairly new to python pandas and cannot find the answer to my problem in any older posts. I have a simple dataframe that looks something like that: dfA ={'stop':[1,2,3,4,5,1610,1611,1612,1613,1614,2915,...] 'seq':[B, B, D, A, C, C, A, B, A, C, A,...] } Now I want to merge the 'seq' values from e...
Przemko5

0

14

Views

### Difference between the local modifications to two checkouts

I have checked out a same repository twice using svn in two different folders. Then I made local modifications to both checkouts. I would like to find out the difference between the local modifications made to these two checkouts.

0

21

Views

### how to itteratively or recursively diff a structure such as a C/C++ structure as it changes

this might seem like an overly complex or overly simple question, but how would one go about diffing a C or C++ structure or similar, looking for values that either change or do not change, taking into account the existance of sub structures and pointers to sub structures such as struct b substruct[...
PSP CODER

0

4

Views

### How to obtain C++ friend -like OOP behaviour in C#

I need a behaviour similar to the set-theory's difference operator \. I am trying to get something of a friend class behaviour since i have the following situation: public interface IRead { List GetInnerResource(); } public interface IWrite() { bool SetInnerResource(); } public interface IFull:IRe...

0

85

Views

### Find differences between two multidimensional arrays in PHP

I have two multidimensional arrays that consist of arrays and objects. \$new = [ 'a' => 'b', 'c' => (object)[ 'd' => [1 => 11, 2 => 12], 'f' => 'Hello', ], ]; \$old = [ 'a' => 'b', 'c' => (object) [ 'd' => [1 => 11, 2 => 22], 'f' => 'Goodbye', ], ]; I'm trying to find differences between these two arr...
F.Ndr

1

19

Views

### Result different in Powershell.exe compared to Powershell IDE

Any idea why this is happening? I'm trying to build a string that contains all the information I want (the final is to be output in a GUI, in a DataGridView cell), in Powershell.exe the mediatype and healthstatus are shown as codes (3,4,0) instead of the strings (HDD,SSD,OK) like shown in IDE: The c...
Rakha

2

64

Views

### Find mapping that translates one list of clusters to another in Python [duplicate]

This question already has an answer here: reordering cluster numbers for correct correspondence 1 answer I am using scikit-learn to cluster some data, and I want to compare the results of different clustering techniques. I am immediately faced with the issue that the labels for the clusters are di...
Aaron Bramson

1

55

Views

### How to subtract two system times using Java [duplicate]

This question already has an answer here: How to convert milliseconds to “hh:mm:ss” format? 17 answers How do I measure time elapsed in Java? [duplicate] 15 answers How to convert Milliseconds to “X mins, x seconds” in Java? 25 answers I have written a Selenium script and I want to calcul...

2

30

Views

### Find difference between group of fields if the value of group 1 is higher than value of group 2

I have a table 'Components' with the following fields Person ID Date_from CompType Value 000001 01/01/2003 A1 100 000001 01/01/2003 B1 200 000001 01/01/2003 C1 150 000001 01/01/2003 D1 180 0000...

2

30

Views

### How to find elements of one vector that aren't in another (not using setdiff)

I have two vectors, x
Sarina

1

146

Views

### comparing temporal sequences

I'm trying to wrap my head around this task and wondering if there is a standard way of doing this or some libraries that would be useful. Certain events are tracked and timed at several data sources S1 ... SN. The recorded information is the event type and timestamp. There may be several events of...
m1tk4

1

1.2k

Views

### Combine two PHP mysql_fetch_assoc sets of MySQL multidimensional arrays into one single-dimensional array

Would greatly appreciate any help with this. I'm running two mysql_query's to retrieve an array of total bulletins for a specified user in a database from one table (bulletins) and signed bulletins from a second table (bulletins_sign_log). The problem I'm running into is how to determine out of the...
SirOracle

2

875

Views

### PHP inverse for array_diff_assoc(), remove duplicate values

I haver permissions levels system, so i need remove from my array my previos selected permissions. For example: My permissions: read, write All permissions: read, write, update, delete I need return: update, delete The problem: array_diff_assoc() compare exact keys, [0] = [0], i need compare valu...
user1149440

1

241

Views

### how to optimize search difference between array / list of object

Premesis: I am using ActionScript with two arraycollections containing objects with values to be matched... I need a solution for this (if in the framework there is a library that does it better) otherwise any suggestions are appreciated... Let's assume I have two lists of elements A and B (no dupli...
Marcx

2

181

Views

### How to generate IObservable index delta on the go?

I have two data sources. One of them is a cached list, and another one is the new data pushed via IObservable. I want to use Rx to find out which operations need to be performed on the cached list A to make it identical in its order and contents to the new data. I am looking for a function that ta...
Dan Abramov

1

104

Views

### Tests Passing, Not working in the browser [closed]

I am using a mongo database and and PHP to compare file meta information to a directory of files to see whats missing where. We then return an associative array of files and database to see whats missing and from where. Note: You do not need to know mongo in order to help me out. For example, if I d...
TheWebs

2

531

Views

### How do I solve this issue faced in datepicker dialog in android? [duplicate]

Possible Duplicate: Calculating the difference between two Java date instances Please do help me. I'm finding the difference between two dates and everything is fine if the start date and end date are in the same month.. but if I chose today's date as the start date and February 1st as the end date....
Deepthi

2

162

Views

### array_diff does not show the difference

I'm trying to compare two arrays using this code: \$diff = array_diff(\$selected, \$checkboxes); echo 'selected:'; print_r(\$selected); echo 'original:'; print_r(\$checkboxes); echo 'difference:'; print_r(\$diff); The strange thing is though this results in the following: selected:Array ( [0] => Forum1 [1...
user1803370

1

439

Views

### Prolog difference list - mergesort

I must write predicate which will split one list into two lists (on halve): halve(X-Y, X-Z, Z-Y) :- halve_pom(X-Y, X-Y, Z), !. halve_pom(Z-Y, Y-Y, Z). halve_pom([_|A]-Y, [_,_|B]-Y, Z) :- halve_pom(A-Y, B-Y, Z). That was easy, but now I must write algorithm which will do mergesort - I don't have any...
Jacob

1

171

Views

### creating a difference file from .csv files

I am creating an application which converts a MS Access table and an Excel sheet to .csv files and then differences the access table with the excel sheet. The .csv files are fine but the resulting difference file has errors in fields that contain html (the access table has fields with the html). I'm...
Mikkel Bang

2

51

Views

### Subtracting hex-valued file names

Using QNX Neutrino, I need to subtract hex-valued file names from their predecessors. The files are named by their creation time in hex. The following gets me a list of pure hex values, but I cannot subtrace them from eachother. last=0 find /path/ -type f\(! iname '.*' \) -exec basename {} | while r...
Brian Gunter

2

835

Views

### how to get date difference in openerp?

I want to get the number of days between two dates. How can I achieve this in openerp? I need to comapare the current date with a past date and get the number of days in between.
Hassan Zaheer

1

253

Views

### could you explain the reasons about output when using std::hex and std::wios::hex in C++

I have three programs. the code of programA is shown below: #include 'stdafx.h' #include #include #include using namespace std; int _tmain( void ) { wstringstream s2; TCHAR waTemp2[4] = {0xA0, 0xA1, 0x00A2, 0xA3}; for (int i = 0; i < 4; i++) { s2
yaoike