Questions tagged [compare]

1

votes
0

answer
51

Views

Compare beta coefficients of the same regression

is there a way to compare (standardized) beta coefficients of one sample and regression without generating two models and conducting an anova? Is there a simpler method with e.g. one function? For example, if I have this model and would want to compare beta coefficients of SE_gesamt and CE_gesamt (o...
Karen H
1

votes
0

answer
160

Views

in PayPal, Is it possible to get buyers shipping address from his email address?

I am using PayPal Rest API, and I make PHP page that ask buyers shipping addresses and do payment. So buyer inputs his shipping address before click 'Pay' button. Here when doing payment, I want to compare this shipping address with buyer's PayPal shipping address. I know buyer has his shipping addr...
LarAng
1

votes
0

answer
68

Views

r - compare elements of list from one dataframe to values from another dataframe

I'm trying to compare two datasets of which the first one is standard dataframe and the other is a dataframe with a list column. My goal is to compare every element from the list in the list column var34 with the two variables in df_i called var1 and var2. In the case when they are equal I would...
adl
1

votes
0

answer
128

Views

R: Crossvalidation of a lasso parameter and comparison to cv.glmnet

I've two questions regarding the Cross-Validation. I tried to create a code for Cross-Validation by myself to improve my intuition. In particular I find the optimal penalize parameter lambda for the Lasso. Here is my Code for the CV: CV_lambda
Leo96
1

votes
2

answer
42

Views

Compare value in R data frame after certain index

I have a data.frame as given below. I want to get the index/row number where (b-a)>8 but I want to compare them after row 7 not from row 1. I have written the code to get me the row number where b-a>8 satisfies but it checks from row 1. How to check it from row 7? a
user15051990
1

votes
1

answer
141

Views

Compare content of two lists, Java, Selenium

I'm creating simple grabber in Java for my use. Overall the thing I want to do is: Get all links from main page and check if they are internal Store internal link in a listOld (temporally they are stored in set to avoid duplicated links then saved to list) Visit link from listOld Get all links from...
LVN
1

votes
1

answer
23

Views

How to get correctly difference new generated unique ids and full list of all ids?

I have sample function for generate unique ids: function generate_uuid($needed_ids_num = 1, int $random_bytes_length = 6) { $ids = []; while (count($ids) < $needed_ids_num) { $id = bin2hex(random_bytes($random_bytes_length)); if (!isset($ids[$id])) $ids[$id] = true; } $ids = array_keys($ids); return...
Andreas Hunter
1

votes
2

answer
330

Views

C# Find Like Strings In Array

Question: I have a array of strings and I am trying to find the closest match to a provided string. I have made a few attempts below as well as checking into some other solutions such as Levenshtein Distance which seems to only work if all the strings are of similar sizes. Expetation: If I were to u...
Pie
0

votes
0

answer
7

Views

String comparison in 2 adjacent rows of a data frame in R

I have a data-frame with 627 observations and 16 variables are present. I am considering one column named 'ZoneDivison' which has factors: North Eastern, Eastern and South Eastern. So, I want to compare the adjacent row values and create a new column which has 1, if two adjacent rows have same zones...
Ami
1

votes
0

answer
358

Views

Compare Dates Pipe Angular 6 - How get Data from Observable?

I use Angular CLI6 What is wrong ? I want to hide DateEnd if the month and the year is equal to the month and year of the start date? @Component({ selector: 'my-app', template: ` ({{ ppsToDisplay?.EndDate | date:'MMMM y'}}) `, providers: [DatePipe] }) constructor(private datePipe: DatePipe) SameDa...
1

votes
1

answer
61

Views

Compare every n rows and show boolean vector

I have similar issue like in this questions Compare every 2 rows and show mismatches in R I would like to compare not only 2 rows but for example 3, 4, etc. I have a data.table here: DT
Jenny
1

votes
0

answer
71

Views

Concatenate dynamic variables

I'm currently working on a powershell script that could compare 2 or more csv files. So far, the comparing part is all up and working. I now need my users to be able to say which column they'd like to compare beetween the file they've choosen. I get the user to choose the files using the following...
Xavier Vilain
1

votes
0

answer
17

Views

get common lines in two files with different number of cols

I have two txt files like this file1.txt >100kb ENSG00000004534 ENSG00000006453 ENSG00000011105 ENSG00000011275 ENSG00000014164 ENSG00000018408 ENSG00000028277 ENSG00000029534 ENSG00000039139 ENSG00000039560 file2.txt Chromosome Start End Strand Gene Name n. Totaln X...
Mia Lua
1

votes
1

answer
996

Views

Compare two hashtable in powershell

Hello i'm beginner and I need to compare two hashtable and to have an other respawn. For example : [hashtable]$alpha [email protected]{ 'A1' = 'computer'; 'A2' = 'folder'; 'A3' = 'plane'; 'A4' = 'flower'; 'A5' = 'dog'; } [hashtable]$beta [email protected]{ 'computer' = 'P1'; 'plane' = 'P2'; 'garden' = 'p3'; 'flower' = 'P4'; 'd...
Snowung
1

votes
0

answer
93

Views

TextFile Comparer in C# using DiffMatchPatch trimming leading spaces issue

I was using https://github.com/google/diff-match-patch in my C# project to compare text files. Dump the difference into html and send it as an email body to my mail in case when difference was found. The way I'm using is the following: var dump = DiffMatchPatchModule.Default; var diffs = dump.DiffMa...
Max Skliar
1

votes
0

answer
224

Views

Why is Kotlin with 50k iterations faster than Java?

I have the same source code twice. Once in java and once in kotlin. The algorithm is very simple. First the java code: public class ConcatString implements Runnable { private final int o; long start; private long conTime; public ConcatString(final int o) { this.o = o; } @Override public void run()...
Schloni1995
1

votes
1

answer
28

Views

Best way to compare values to two javascript objects

I am writing a bunch of unit tests and was wondering what is the best way to compare values of two javascript objects (the actual vs the expected). Lets say I have the following ActualObject: { Val1: '1', Val2: '2', Val3: '3', Val4: '4' } ExpectedObject: { Val1: '1', Val2: '2', Val3: '3', Val4: '4'...
tmp dev
1

votes
1

answer
78

Views

Compare large csv files inside 2 folders and print exact difference along with the line number in python

I have to compare large csv files inside 2 different folders. The files are stored in same name inside these folders. After comparing I need to print the file name, line number and the field which is different. If any line is missing in one of the csv's then I need to print that as well with filenam...
Pri31
1

votes
1

answer
46

Views

Better Solution than For Loops when Comparing Values of Grouped Variables in R

I am fairly new to R, and have spent a long time looking for a better way to solve my issue below with no success. I was able to develop a solution using for loops that works; however, I am breaking the rules described on this GitHub tutorial discussing what to avoid when writing loops. I am workin...
DRC
1

votes
0

answer
40

Views

Check equal values in two different Columns on Google Scripts

I was wondering how can I get the following result: var X = [ex1, ex2, ex3, ex4]; var Y = [ex3, ex8, ex1, ex5]; Each one of the variables (X and Y) are in different sheets (Let's say, 'sheet' and 'sheet4'), at the column B of the respective sheet. The output would be = [ex3, ex1]; I then need to ex...
Tiago Silva
1

votes
1

answer
39

Views

Compare Call Trees option is disabled in instrument

I have two runs in instrument. Second run is optimized version of the first run. I want to compare them but while selecting Instrument option from menu, the Compare Call Trees.. option is disabled. How can this option be enabled?
prekshya basnet
1

votes
0

answer
32

Views

postgresql compare two databases add missing columns

I have two identical databases, let's say: databasemaster: ID (int) , NAME (charactervariying(30)) , SURNAME(charactervarying(30)) database1: ID (int) , NAME (charactervariying(30)) , SURNAME(charactervarying(30)) I am adding a column to databasemaster let's say, (charactervariying(50)) , AIM: I w...
THUNDER SOFTWARE
1

votes
1

answer
45

Views

How can I compare two SQLlite dataset in Python and search for similarities?

So basically, I have two databases. One for 'student' and one for 'teacher'. The teacher database is already saved on the server and the students database will be created by user input. this is for the teacher (also saved separately in a teacher.db file) c.execute(“””CREATE TABLE teacher( I...
Elisabeth
1

votes
1

answer
146

Views

Best way to compare 2 dfs, get the name of different col & before + after vals?

What is the best way to compare 2 dataframes w/ the same column names, row by row, if a cell is different have the Before & After value and which cellis different in that dataframe. I know this question has been asked a lot, but none of the applications fit my use case. Speed is important. There is...
WIT
1

votes
2

answer
49

Views

compare two string Date js?

I have two date strings with different formats: var date1 = '20/09/2016';//DD/MM/YYYY var date2 = 'Sep 5, 2018 12:00:00 AM'; // MMM DD, YYYY hh:mm:ss AM How can I convert the two string to date just using DD & MM & YYYY and compare them?
Abdelmajid Bahmed
1

votes
0

answer
50

Views

Basic operations with UI components in Android

EDITED I've created a simple UI in Android Studio which requires to use Button, Radio Group, Edit Text etc. So every time I press the radio button, it toasts the message which button was pressed. If I type a specific word in search bar, in my example 'Car', and the radio button is on Pictures, fo...
casper
1

votes
1

answer
36

Views

Excel VBA compare, add row and fill in

So this is an example of my data: A1. 1 A2. 2 A3. 5 A4. 7 A5. 8 A6. 9 A7. 10 What I want to do is select a range (e.g. from A2 to End of the row that has data), insert a row if the next number in the sequence does not equal the previous number + 1. Fill in that number (previous number +1) in...
adambroni
1

votes
0

answer
51

Views

Why do I get both true and false for this Prolog comparison?

regions([a,b,c,d,e,f]). colors([brown,green,blue,red]). hascolor(X,brown):-regions([X|_]). hascolor(X,brown):-regions([_,_,_,_,X,_]). hascolor(X,blue):-regions([_,X,_,_,_,_]). hascolor(X,blue):-regions([_,_,_,X,_,_]). hascolor(X,green):-regions([_,_,_,_,_,X]). hascolor(X,red):-regions([_,_,X,_,_,_])...
Jebz
1

votes
1

answer
31

Views

Javascript. help understanding how the comparison function when sorting numbers in an array works

Okay, so i understand how to sort numbers from big to small or small to big. what I don't understand is how it actually is done by javascript. can somebody walk me through, step by step how javascript is sorting the following array? I know how to use it, I need to understand it. var arr = [3, 2, 4,...
David Zalk
1

votes
3

answer
34

Views

AWK, Compare of two files then compare the other field for the match one and do arithmetic

File A Jimmy|03-OCT-18|BST100114261|20000 Dedi|03-OCT-18|BST100904288|10000 Jimmy|03-OCT-18|BST100114262|120000 File B Anton|9800 Jimmy|90000 Output Jimmy|20000|90000|1800000000|BST100114261 Jimmy|120000|90000|30000|BST100114262 Logic: Find the same Jimmy Compare amount between File A (column 4) an...
cenglee
1

votes
2

answer
46

Views

Compare 2 values out of a string with a batch file

I have the following code which gets the current state of a set of licenses: set licensefile='D:\PLM\Solid Edge ST10\Preferences\SElicense.dat' set _output=lmutil lmstat -c %licensefile% -f 'solidedgeclassic' for /f 'tokens=2 delims=()=' %%G IN ('%_output% ^|find 'issued'') DO set line=%%G This, set...
Jan Willem
1

votes
2

answer
84

Views

Compare date with if statement in jQuery to do list

I want to highlight overdue task when refresh page and when click on add task button such as the code below: $(document).ready(function(){ $('.add-task').on('click',function(){ $('.task-date').each(function(){ var a = new Date().dateFormat('dd/mm/yy').getTime(); var b = formatDate(b,'dd/mm/yy').getT...
1

votes
2

answer
37

Views

Java How Compare XML Data with file extensions

im new here , just wanted to try if i can get some help here. I would like to ask for some help for my problem. I got an XML-File, and i would like to compare those Strings there with File extension for exmaple. Example.txt -> compare all Strings in XML with my File-Extension.
KmanTheMan
1

votes
1

answer
76

Views

How to merge two dictionaries based on their keys and values in Python?

I have a problem with merging two dictionaries in Python based on its keys and values. I have the following case: dictionary_1 = { 1{House: red, index=1} , 2{House: blue, index=2} , 3{House: green, index=3}} dictionary_2 = { 4{Height: 3, index =3} , 5{Height: 5, index=1} , 6{Height: 6, index=2} So f...
Dj_ 96
1

votes
3

answer
92

Views

How to compare a value with columns values in a pandas dataframe

000012 000013 000014 ... 004004 005585 007682 0 0 3.8 3.7 ... 1.1 4.8 0.4 1 0 0 0.0 ... 0.0 5 7.8 2 0 0 0.0 ... 0.0 1.6 2.1 3 0 0 2.0 ... 2.3 0...
guille eh
1

votes
1

answer
34

Views

Compare-Object resulting in incorrect results

When trying to use Compare-Object for two lists of PC names, the result is a list of server names from one item, and System.Object[] for the other. Both items are of type string, so I'm not sure why this is happening. My two lists names are $SCC, and $windowsWorkstations. When I run $SCC, it returns...
JK72
1

votes
0

answer
71

Views

Java: compare two numbers directly (a < b) vs by subtracting (a-b < 0)

In the books and others code, I can see sometimes if (a-b < 0) ... instead of just simple and better readable if (a < b) ... What is the reason for that? Is there any performance gain? Or this is just a personal style of coding?... PS Made the quick naive test with jmh and didn't find any perfor...
Artsiom Chapialiou
1

votes
0

answer
35

Views

Compare two ffdf

I have two very large data sets (50M rows, 130 columns) which i can't compare with basic packages. Therefore i have to use an ffdf. It's the first time i am working with the ff package. I am trying to compare two ffdf and then write the differences in two outputfile ('in_file1_not_in_file2', 'in_fil...
Marvelous
1

votes
1

answer
20

Views

How can I get DataAnnotations.Compare to compare properties from 2 different objects?

I'm getting an error using the view below The property Models.m_Join.Member.password could not be found. The 'Password' field that the error refers to is part of the 'member' object that is in the m_Join model. I've tried using : - [System.ComponentModel.DataAnnotations.Compare('member.password', Er...
Matt
1

votes
2

answer
49

Views

How to fetch data from table and compare it and display the result in laravel?

I want to fetch the data from the table. I have two tables one test and another one is user and I want to compare the skillneed with skill and display the job that matches skillneed and skill. How can I do it? public function post( Request $request) { Test::create([ 'jobtitle'=>$request['jobtitle'],...
Anish Ansari

View additional questions