The SQL intersect operator returns rows that are common between two tables without returning duplicate records.
Questions tagged [intersect]
643 questions
0
votes
1 answer
Python: recreate union and intersect of 2 lists with basic tools
I have to recreate the 2 pythons functions "a.union(b)" and a.intersect(b) with only with the tools
append; pop; len;while; for i in range; if-else; l[i] (for a list l); and booleens
And to have at the end a function with 2 lists as argument and to…
0
votes
1 answer
intersect(A,B) returns the data with no repetitions
I was using "intersect" in my Matlab code where I want the following:
A = [ 4 1 1 2 3];
[B] = sort(A, 'ascend'); % so that B is sorting A in ascending order, so I got B = [1 1 2 3 4]
[same,a] = intersect(B,A);
I want same = [1 1 2 3 4] but the…

user2563812
- 219
- 1
- 2
- 12
0
votes
1 answer
in R, selecting rows from mydataframe based upon array of values when array and mydataframe are unequal length
I have the following data called gg and yy.
> str(gg)
num [1:1992] 128 130 132 185 186 187 188 189 190 191 ...
> str(yy)
'data.frame': 2103 obs. of 2 variables:
$ grp : num 128 130 132 185 186 187 188 189 190 191 ...
$ predd: num -0.963…

Seth Myers
- 251
- 2
- 12
0
votes
1 answer
Collision detection while using rectangles
So I understand that I'm not coding this the best way possible at the moment; this is a sort of test run. What I'm trying to do is wall collisions using rectangles and the intersects property (sorry if I'm not using the correct terminology). So far…

DaBoydMan
- 11
- 1
- 2
0
votes
2 answers
Cassandra: How to model column family to perform intersect-like queries
Basically I have three attributes: partId, measurementDef and value.
Each part (partId) consists of multiple measures (value) of a certain type (measurementDef).
Formatted as a tree it would look something like this:
-part 1
|- measurementDef 1 ->…

Thomas Fischer
- 126
- 1
- 6
0
votes
1 answer
MySQL Intersect Query on One Table
I have a table that contains event information for users, i.e. each row contains an ID, a user's start date, completion date, and the event number. Example:
Row 1: ID 256 | StartDate 13360500 | FinishDate 13390500 | EventNum 3
I am trying to…

mgh14
- 3
- 1
- 3
0
votes
3 answers
delete repeat elements matlab
I have two matrices:
Input:
A = [1,1;2,4;3,9;4,16;5,25];
B = [3,9;4,16;6,26;7,49;5,25];
Output:
A = [1,1;2,4;3,9;4,16;5,25];
B = [6,26;7,49];
I want to delete the repeating elements of A from B or vice-versa. Below is my current approach, but…

roni
- 1,443
- 3
- 28
- 49
0
votes
1 answer
OpenStreetMap - determine if circle intersect road
How can i determine if a given point(lat,lon) is in a road segment or not?
Further explanation on what i want to achieve :
I have a reference point(lat1,lon1). I determine a circle with a radius of 30 meters, and a center (lat1, lon1). if want to…
0
votes
1 answer
how to speed up the pattern search btw two lists : python
I have two fastq files like the one given below. Each record in the file starts with '@'. For two such files, my aim is to extract records that are common btw two…

user2464966
- 3
- 2
0
votes
2 answers
TSQL optimize multiple Intersect
The problem query uses multiple Intersect.
Changing it to an in ('alpha','beta','gamma','delta','epsilon','phi') group by having count() = 6 is not an option as the application supports like with wild cards (e.g. alpha%). But the count() = 6…

paparazzo
- 44,497
- 23
- 105
- 176
0
votes
1 answer
how to intersect a mult-dimensional array
i'm building a search engine for my site. I have an index of all the words contained in the pages of my site and their positions. I am using php arrays, and the info returned after a search looks like this:
'jeff' =>
array
1 =>
…

user2075354
- 409
- 1
- 4
- 6
0
votes
0 answers
Efficiently Intersecting Big Boolean Arrays
Suppose I have N Boolean arrays of size M. I simply want to intersect between pairs of these Boolean arrays efficiently (in optimized time). In my problem in hand, N is at least equal to 4500 and M is always equal to 6040. How can I make my…
0
votes
1 answer
Preventing two draggable circles from overlapping when they intersect
Ive looked everywhere i could for what i am guessing has a simple solution. But i am a new programmer and am having a bit of trouble. I have a few draggable image view circles in my view and i want to prevent any overlapping between the image views.…

pDev1
- 5
- 3
0
votes
1 answer
C# Direct X 9.0c - Mesh Intersect
I want to get a Collide Vector of a Mesh using a Up-Vector.
I have a position and a Up Vector.. with these both I calculate the far vector
public Vector3 SetPlayerToGround(Matrix Object, Matrix Player, Mesh GroundObject)
{
…

ZeraTFK
- 1
- 4
0
votes
1 answer
How to intersect and find different keys in Redis
I'm looking to get a list of redis keys as efficient as possible. We can model this on the redis server however we like so this is as much about the proper way to do it as it is solving the problem. Let me describe the situation.
Assume a large set…

Nathan Palmer
- 1,970
- 1
- 20
- 28