overlapping

Collapse rows with overlapping ranges

只愿长相守 提交于 2019-11-27 14:51:09
I have a data.frame with start and end time: ranges<- data.frame(start = c(65.72000,65.72187, 65.94312,73.75625,89.61625),stop = c(79.72187,79.72375,79.94312,87.75625,104.94062)) > ranges start stop 1 65.72000 79.72187 2 65.72187 79.72375 3 65.94312 79.94312 4 73.75625 87.75625 5 89.61625 104.94062 In this example, the ranges in row 2 and 3 are entirely within the range between 'start' on row 1 and stop on row 4. Thus, the overlapping ranges 1-4 should be collapsed to one range: > ranges start stop 1 65.72000 87.75625 5 89.61625 104.94062 I tried this: mdat <- outer(ranges$start, ranges$stop,

Highcharts spline dataLabels overlapping

邮差的信 提交于 2019-11-27 09:53:49
I have a question about highchart's overlapping data labels. I have 2 spline data series and as you can see here http://jsfiddle.net/3E8V4/ some data labels are overlapping. Question here is: is this overlapping even possible to prevent? If yes - how should I do it? Code for plotoptions is like that: plotOptions: { spline: { dataLabels: { enabled: 'True', crop: false, overflow: 'none' }, enableMouseTracking: false } }, You can use that plugin for repositioning dataLabels: http://jsfiddle.net/menXU/1/ It's not perfect, since works only for max 2 series and requires disabled animations, or you

Overlapping elements - HTML, CSS, and jQuery

喜欢而已 提交于 2019-11-27 07:18:43
问题 I have elements which are overlapping and I would like to prevent this. Here is a picture: http://grab.by/cB7t Also, here is the CSS for those elements: .navigationItem { background: #808080; -webkit-border-radius: 360px; padding: 1.0em; text-decoration: none; color: #fff; position: absolute; -webkit-box-shadow: 0px 2px 5px #909090; font-weight: bold; text-shadow: 1px 1px 2px #707070; font-size: 1.0em; } And here they are in the HTML: <a href="#" class="navigationItem" id="nav0">play</a> <a

Check if two times overlap

别来无恙 提交于 2019-11-27 02:54:14
问题 I want to see if a time I read from a db overlaps with a time provided by a user. My database looks like this: ----------------------------------------------- |organiser|meeting_start|meeting_end|boardroom| ----------------------------------------------- | John Doe| 1340193600 | 1340195400| big | ----------------------------------------------- My code looks like this: date_default_timezone_set('Africa/Johannesburg'); $from = strtotime($_GET['meeting_date'] . ' ' . $_GET['meeting_start']); $to

Merging intervals in one pass in SQL

ぐ巨炮叔叔 提交于 2019-11-26 23:23:59
问题 Let's say I have a table with two columns: start and end , both integers, and the table is ordered by the first, then second column. Each row represents an interval. What I need is the table of merged intervals: all overlapping or adjacent intervals gobbled up into one. It can be constructed with a JOIN query, but that is quadratic in the number of rows, which is 4 million rows in my case (I decided to compose this question because the query is still running). It can also be done in a single

Should Hibernate be able to handle overlapping foreign keys?

自作多情 提交于 2019-11-26 20:15:34
问题 I have a table that has two foreign keys to two different tables with both foreign keys sharing one column : CREATE TABLE ZipAreas ( country_code CHAR(2) NOT NULL, zip_code VARCHAR(10) NOT NULL, state_code VARCHAR(5) NOT NULL, city_name VARCHAR(100) NOT NULL, PRIMARY KEY (country_code, zip_code, state_code, city_name), FOREIGN KEY (country_code, zip_code) REFERENCES Zips (country_code, code), FOREIGN KEY (country_code, state_code, city_name) REFERENCES Cities (country_code, state_code, name)

Collapse rows with overlapping ranges

被刻印的时光 ゝ 提交于 2019-11-26 17:47:42
问题 I have a data.frame with start and end time: ranges<- data.frame(start = c(65.72000,65.72187, 65.94312,73.75625,89.61625),stop = c(79.72187,79.72375,79.94312,87.75625,104.94062)) > ranges start stop 1 65.72000 79.72187 2 65.72187 79.72375 3 65.94312 79.94312 4 73.75625 87.75625 5 89.61625 104.94062 In this example, the ranges in row 2 and 3 are entirely within the range between 'start' on row 1 and stop on row 4. Thus, the overlapping ranges 1-4 should be collapsed to one range: > ranges

Highcharts spline dataLabels overlapping

给你一囗甜甜゛ 提交于 2019-11-26 14:57:03
问题 I have a question about highchart's overlapping data labels. I have 2 spline data series and as you can see here http://jsfiddle.net/3E8V4/ some data labels are overlapping. Question here is: is this overlapping even possible to prevent? If yes - how should I do it? Code for plotoptions is like that: plotOptions: { spline: { dataLabels: { enabled: 'True', crop: false, overflow: 'none' }, enableMouseTracking: false } }, 回答1: You can use that plugin for repositioning dataLabels: http://jsfiddle

How to find overlapping matches with a regexp?

試著忘記壹切 提交于 2019-11-25 22:28:49
问题 >>> match = re.findall(r\'\\w\\w\', \'hello\') >>> print match [\'he\', \'ll\'] Since \\w\\w means two characters, \'he\' and \'ll\' are expected. But why do \'el\' and \'lo\' not match the regex? >>> match1 = re.findall(r\'el\', \'hello\') >>> print match1 [\'el\'] >>> 回答1: findall doesn't yield overlapping matches by default. This expression does however: >>> re.findall(r'(?=(\w\w))', 'hello') ['he', 'el', 'll', 'lo'] Here (?=...) is a lookahead assertion: (?=...) matches if ... matches

Python regex find all overlapping matches?

微笑、不失礼 提交于 2019-11-25 21:47:08
问题 I\'m trying to find every 10 digit series of numbers within a larger series of numbers using re in Python 2.6. I\'m easily able to grab no overlapping matches, but I want every match in the number series. Eg. in \"123456789123456789\" I should get the following list: [1234567891,2345678912,3456789123,4567891234,5678912345,6789123456,7891234567,8912345678,9123456789] I\'ve found references to a \"lookahead\", but the examples I\'ve seen only show pairs of numbers rather than larger groupings