Questions tagged [overlap]

Two or more elements overlap when they partially or totally cover one another.

Two or more elements overlap when they partially or totally cover one another.
The way to find if the elements overlap or not is to test if one elements begins before the second one ends, while the second one begins before the first one ends.

For example, here are all of the ways two lines can overlap:

1.
s1|--------|e1
s2|--------|e2


2.
s1|-------|e1
     s2|--------|e2


3.
     s1|--------|e1
s2|--------|e2


4.
s1|-------------------|e1
     s2|--------|e2


5.
     s1|--------|e1
s2|-------------------|e2

Note that s1 is always smaller than e2, while s2 is always smaller than e1.

This is not the case when the two lines do not overlap:

1.
s1|--------|e1
                 s2|--------|e2


2.
                 s1|--------|e1
s2|--------|e2

Note that either s1 is bigger then e2 or s2 is bigger then e1.

The actual data type of the elements is completely irrelevant as long as it's comparable.

Therefore, to check if two elements overlap each other, all you need to do is this: (pseudo code)

If a.Start < b.End AND b.Start < a.End Then
    Overlap
Else
    No overlap
1905 questions
0
votes
1 answer

TextField overlapse another TextField - Android

I've got a textfield that contain a film genres and another one that contain film description. The description is setted below the film thumb that have a fixed size and the genres are on the right of the thumb. Problem is that the genres can be to…
Fyruz
  • 75
  • 1
  • 20
0
votes
1 answer

Calculating Timestamp Overlap Duration

I have a business that rents out one particular product. I would like to know the duration in minutes of when a particular location is out of stock. The first data set has transaction history with the location ID, rental starting time stamp, and…
0
votes
2 answers

fragments overlaps after activity is recreated

In my sample, I try to learn the difference between commitAllowingStateLoss() and commit() methods for fragments. Now I know IllegalArgumentException will appear if using commit() after activity save instance (for example, executed commit() when…
Jone
  • 13
  • 4
0
votes
1 answer

new Edit Area and coordinates

Ok I edit my code, what I want to do is simple I have a big shape with corrdinates(x,y). what I want to do is resize my primitive shape, store it inside new figure inside a class called "new" and move this new shape to the cordinates (x,y) I want. …
FL93
  • 29
  • 5
0
votes
1 answer

Looking for guidance on detecting overlap of UIImageViews

The scenario is that I have a UIViewController containing multiple "InteractiveUIImageViews" (inherited from UIImageView) each containing their own UIImage. In InteractiveUIImageView I have iplemented methods for touchesBegan, touchesMoved and…
0
votes
1 answer

find next non-overlapping nth elements of a given region

I have the following problem: I want to find the next 5 gene in (chr1_gene) on both side of a interval give from the GRanges (gr3) and generate a dataframe containing chr start end (from gr3) of the interval and i column for each…
user3300849
  • 189
  • 2
  • 13
0
votes
0 answers

Finding overlapping intervals

I have intervals in a data frame df like…
Carol
  • 367
  • 2
  • 3
  • 18
0
votes
1 answer

EXCEL-Sum total surgerie duration of surgeries in the weekend and before or after working hours (with overlap)

First I had to determine per specialty the total percentage of surgeries that started outside the regular working hours or in weekends. The final line became: =SUMPRODUCT(((Table1[Start surgery]>TIME(17;0;0))*(WEEKDAY(Table1[Surgery…
user3755730
  • 27
  • 1
  • 3
0
votes
1 answer

Fullcalendar Scheduler (Event Overlap on Timeline Year)

I have a lot of events on Fullcalendar Scheduler. On default, eventOverlap is true, but eventOverlap is not working on timelineYear. This is the picture of my Fullcalendar Scheduler: I want to make them overlapping just like agendaWeek view. Is…
0
votes
1 answer

jquery detect overlap multiple sections

I'm trying to make my fixed navigation change color when it overlaps different parts of my website. Much like the navigation on this website: http://andpizza.com/ My html exists of divs and sections.
Paul van den Dool
  • 3,020
  • 3
  • 20
  • 44
0
votes
1 answer

How do I Work with Overlapping layers and links in JQuery?

Working with Overlapping layers and links in JQuery tr________________________________________________________________________________ | td | td | td | | checkbox | …
J146
  • 141
  • 1
  • 1
  • 3
0
votes
2 answers

Kind stuck on the output when the output overlap

I am very new on verilog. So this is my question: Implement 16 bits ALU with 16 bit register. This project should meet the following requirement. 1. Design a 16 bitALU : Design a 16 bit ALU that X as input (eg. A,B..) and produces one 16 bit…
diniebee
  • 5
  • 4
0
votes
1 answer

navbar top fixed shrink with a carousel without overlap

I want to get this effect: www.kemtecnia.com This website has a navbar fixed top which shrinks on scroll down, has below a carousel fixed which seems to disappear by the content below. How can I do in my code to get it? I have the navbar top:
Jesfer
  • 31
  • 1
  • 6
0
votes
2 answers

Fixed position menu overlapping

I'm learning web designing. I tried to make a page out of my knowledge. The page is plant text. Here is the code. Sample Site
learner_99
  • 19
  • 1
  • 1
  • 2
0
votes
1 answer

css divs in div overlapping in wrong way

this is a responsive design https://fiddle.jshell.net/f56fpzn9 i did what i want for mobile view (adjust to see), however in the wide view the textTitle is overlapping with the textBox and the contentBox didn't scratch to fit the size of…
Gary Chan
  • 25
  • 4
1 2 3
99
100