overlap

Count max. number of concurrent user sessions per day

时光毁灭记忆、已成空白 提交于 2020-01-22 20:38:46
问题 Situation We have a PostgreSQL 8.4 database containing user sessions with login date/time and logout date/time per row. Our web application records this time and also handles the case when user does not logout explicitly (session timeout). So a login date/time and logout date/time are given in every case. Goal I need user statistics of the max number of concurrent sessions a day. So, I can say the following: "At 2015-03-16 the peak of concurrent users logged in was six ." Similar questions A

Overlapping Dashed / Dotted Strokes on Adjacent Paths in SVG

笑着哭i 提交于 2020-01-15 11:05:10
问题 I'm building a map of several counties that share borders. Each county is it's own enclosed path, and therefore the borders of adjacent counties are stacked over one another. I'd like to give each county a dashed stroke. However, when applied, the intersecting borders look ugly as the dashed borders of each county overlap, creating an uneven dash appearance. My users will be selecting counties by mousing over the area within the county borders, thus (I believe) making it necessary to create

Overlapping Dashed / Dotted Strokes on Adjacent Paths in SVG

六眼飞鱼酱① 提交于 2020-01-15 11:03:27
问题 I'm building a map of several counties that share borders. Each county is it's own enclosed path, and therefore the borders of adjacent counties are stacked over one another. I'd like to give each county a dashed stroke. However, when applied, the intersecting borders look ugly as the dashed borders of each county overlap, creating an uneven dash appearance. My users will be selecting counties by mousing over the area within the county borders, thus (I believe) making it necessary to create

overlap(intersect) time interval and xts

自闭症网瘾萝莉.ら 提交于 2020-01-15 09:36:07
问题 There's two time datasets: data from raincollector -- time interval ti with start , end and rain p (total amount of rain per period in mm) ti <- data.frame( start = c("2017-06-05 19:30:00", "2017-06-06 12:00:00"), end = c("2017-06-05 23:30:00", "2017-06-06 14:00:00"), p = c(16.4, 4.4) ) ti[,1] <- as.POSIXct(ti[, 1]) ti[,2] <- as.POSIXct(ti[, 2]) and timeseries ts from gauging station with time and parameter q , which is the water discharge (cu. m per sec) ts <- data.frame(stringsAsFactors

Prevent overlapping colours becoming darker in Google Maps

巧了我就是萌 提交于 2020-01-14 05:07:11
问题 I'm not familiar with colour terminology, but how can I prevent Google Maps from making the overlapping area darker? JSFiddle is here Code that generates the circles is: var cityCircle = new google.maps.Circle({ strokeColor: '#FF0000', strokeOpacity: 0.5, strokeWeight: 0, fillColor: '#FF0000', fillOpacity: 0.5, map: map, center: citymap[city].center, radius: Math.sqrt(citymap[city].population) * 100 }); 回答1: As indicated in Voltsan's answer, you can create a single polygon with multiple

Prevent overlapping colours becoming darker in Google Maps

瘦欲@ 提交于 2020-01-14 05:07:06
问题 I'm not familiar with colour terminology, but how can I prevent Google Maps from making the overlapping area darker? JSFiddle is here Code that generates the circles is: var cityCircle = new google.maps.Circle({ strokeColor: '#FF0000', strokeOpacity: 0.5, strokeWeight: 0, fillColor: '#FF0000', fillOpacity: 0.5, map: map, center: citymap[city].center, radius: Math.sqrt(citymap[city].population) * 100 }); 回答1: As indicated in Voltsan's answer, you can create a single polygon with multiple

Jitter dots without overlap

前提是你 提交于 2020-01-14 04:01:07
问题 My data: a <- sample(1:5, 100, replace = TRUE) b <- sample(1:5, 100, replace = TRUE) c <- sample(1:10, 100, replace = TRUE) d <- sample(1:40, 100, replace = TRUE) df <- data.frame(a, b, c, d) Using ggplot2 , I have created scatterplot over x = a and y = b, weighted in two dimension (by colour = c and size = d ). Note that x and y are intentionally 1:5 . Obviously, the points of different sizes and colors therefore overlap, so I tried jitter to avoid overlapping: ggplot(df, aes(a, b, colour =

Javascript Randomly Positioned Div's without overlapping them

醉酒当歌 提交于 2020-01-13 06:14:00
问题 I've been working on a random concept idea of having 6 clouds appear on a page with random comments pulled from a database. That part is easy, however I'm finding it extremely difficult to make sure the 6 clouds don't overlap each other. I've looked into Collision Detection a lot and found that there's no real suitable method of checking for a DIV within a range at X or Y before placing the new "randomly positioned" div on the page. I have my code below which I know is extremely messy right

Multiple Date range comparison for overlap: how to do it efficiently?

喜欢而已 提交于 2020-01-10 14:19:28
问题 To check for overlap in two different dateranges, {Start1, End1} and {Start2, End2} I am checking: if ((Start1 <= End2) && (End1 >= Start2)) { //overlap exists } The question is, what is a good way to compare overlaps if I had let's say five dateranges? . checking to see if any of them don't overlap each other? If I have multiple date ranges, how to find if any of these ranges are overlapping? 回答1: To find if all are overlapping static bool Overlap(params Tuple<DateTime, DateTime>[] ranges) {

Prevent INSERT if time overlap in PgSQL without trigger [duplicate]

左心房为你撑大大i 提交于 2020-01-06 19:33:11
问题 This question already has an answer here : Postgres constraint for unique datetime range (1 answer) Closed 4 years ago . i would like to prevent an insert into my PgSQL table if the values for a time period (lets call them newStart and newEnd), if this would overlap with any other timeperiod in my rows. So, the table has a bunch of row where each has a start and end date (oldStart and oldEnd). Is it possible to do this inside the query, without an trigger, an without getting all the data from