Questions tagged [intersect]

The SQL intersect operator returns rows that are common between two tables without returning duplicate records.

643 questions
-1
votes
1 answer

Intersect/Diff array in PHP

I have a problem using php like this: Array 1: [a=>a, b=>b, c=c, d=d] Array 2: [a=>123, b=>b, c=234] ResultArray: [a=>123, c=>234, d=d] How can I get ResultArray from Array1 & Array2? Can anyone help me. Thanks
-1
votes
2 answers

Given 2 points and a line- do the points intersect the line? : algorithm/pseudocode

A coworker gave me this problem to try out my knowledge: Consider two points, 1 and 2, having coordinates (x1, y1) and (x2, y2), respectively. In the same plane as these two points is a vertical line whose top and bottom are represented by (xTop,…
user7492459
-1
votes
1 answer

Array of Polygons

I want to define Poly gon Array , so : private static ArrayList basePolyList = new ArrayList(); //read the file and store to basePolyList parser.readBaseFile(filename_1, basePolyList); //get size of basePolyList int…
-1
votes
1 answer

How to intersect two columns in r?

I have a data frame as following and I want to intersect them to become one column. ID<-c('>1','>2','>3','>4','>5') TYPE<-c('A','B','O','A','B') old<-data.frame(ID,TYPE) old ID TYPE >1 A >2 B >3 O >4 A >5 B I want to…
Terence Tien
  • 329
  • 1
  • 3
  • 15
-1
votes
2 answers

How to intersect a lot of sets

I have sets {1, 2, 3, 4} {2, 3, 4, 5} {3, 4, 5, 6} {4, 5, 6, 7} {5, 6, 7, 8} I need to intersect sets start from first. I mean that I should to intersect {1, 2, 3, 4} {2, 3, 4, 5} {3, 4, 5, 6} next {2, 3, 4, 5} {3, 4, 5, 6} {4, 5, 6, 7} and…
NineWasps
  • 2,081
  • 8
  • 28
  • 45
-1
votes
2 answers

Intersecting multiple datasets in R

How Do I intersect between multiple samples? I have 29 lists of concatenates I build according to gene name, cc change, coordinate. Each list is 400-800 long. I need to build a table showing how many variants shared among two lists for all 812…
lance
  • 3
  • 2
-1
votes
3 answers

SQL intersect two joined tables

I joined two tables SELECT t1.column1, t2.column2 FROM t1 JOIN t2 cu ON t1.id = t2.id AND t1.col LIKE 'A%' SELECT t1.column1, t2.column2 FROM t1 JOIN t2 cu ON t1.id = t2.id AND t1.col LIKE 'B%'…
gabi906
  • 374
  • 1
  • 4
  • 15
-1
votes
1 answer

How to check if a line segment is the extension of another?

What if I have 2 line segments that is defined by two starting and ending points such as below: line segment 1 starts [0,0] and ends at [5,0] another line segment 2 starts at [3,0] and ends at [8,0] How do I check that line segment 2 extends out of…
Mahmoud Ayman
  • 197
  • 1
  • 13
-1
votes
2 answers

Matlab : Intersect point of curves

Say for example I have data which forms the parabolic curve y=x^2, and I want to read off the x value for a given y value. How do I go about doing this in MATLAB? If it were a straight line, I could just use the equation of the line of best fit to…
james.sw.clark
  • 357
  • 1
  • 8
  • 20
-1
votes
1 answer

Merge multiple queries excluding common results

Data : --Table 1 : Id ZoneName ----------- -------- 20011 Name1 10027 Name1 20011 Name1 20011 Name1 20011 Name1 20074 Name1 20011 Name2 20011 Name2 10059 Name3 20011 Name2 Query : Select…
Murtaza Mandvi
  • 10,708
  • 23
  • 74
  • 109
-1
votes
3 answers

Displaying total number of common and uncommon elements between two arrays?

I have two arrays: array testAnswer holds "answers to a exam" and array inputAnswers holds "students answers to the exam". When i run my code, it displays all the common elements of the two arrays(correct answers), and the uncommon elements…
-1
votes
1 answer

c# why is the intersect method returning this?

I have two arrays, array testAnswer holds "answers to a exam" and array inputAnswers holds "students answers to the exam". I am trying to display the correct, and incorrect answers. In other words, trying to show what values testAnswer has that…
-2
votes
1 answer

how to filter a dataframe column based on intersected values from another column in dataframe

I have two dataframe. I want to filter gene ID from expr_df dataframe based on the intersected values from another data frame gene_Annot.Basically i want to keep genes in expr_df that intersects with geneid from gene_Annot data. This is how my…
-2
votes
1 answer

select row matrix based on same name in other row in r

I have a matrix and i want to select part of row based column first, like below example: original matrix: x1 x2 x3 x4 x5 a a 15 16 0 b j 12 10 8 c h 14 0 0 d b 28 …
rezgar
  • 114
  • 8
-2
votes
1 answer

Compare two tables and extract the columns similar to both

enter image description hereHi I have two data matrix, one is A and the other is B. I want to compare the first row of A to that of B and if a match is found in B, then the whole column(s) in B should be extracted. In the attached file, under A, 11,…
Python1
  • 1
  • 2
1 2 3
42
43