Top "Intervals" questions

Intervals are used to measure “distance” between values.

Is it okay to use Thread.sleep() in a loop in Java, to do something at regular intervals?

I have read some threads that said that calling Thread.sleep() in a loop is problematic and is a serious …

java multithreading loops intervals thread-sleep
Data structure for handling intervals

I have got a series of time intervals (t_start,t_end), that cannot overlap, i.e.: t_end(i) &…

algorithm data-structures tree intervals
Algorithm to find the maximum sum in a sequence of overlapping intervals

The problem I am trying to solve has a list of intervals on the number line, each with a pre-defined …

algorithm sum max intervals
Python: Mapping from intervals to values

I'm refactoring a function that, given a series of endpoints that implicitly define intervals, checks if a number is included …

python range intervals
How can i loop through a daterange with different intervals?

I have a daterange (from, to) that i want loop through an different intervals (daily, weekly, monthly, ...) How can i …

ruby-on-rails ruby ruby-on-rails-3 activerecord intervals
How to match multiple columns in pandas DataFrame for an "interval"?

I have the following pandas DataFrame: import pandas as pd df = pd.DataFrame('filename.csv') print(df) order start end …

python pandas dataframe match intervals
Grouping SQL results by continuous time intervals (oracle sql)

Hi I have following data in the table: ID-----startDate----endDate 5549 2008-05-01 4712-12-31 5567 2008-04-17 2008-04-30 1 5567 2008-05-01 2008-07…

sql oracle date continuous intervals
MySQL DATE_ADD INTERVAL

mysql_query("UPDATE tablename SET date = DATE_ADD(DATE(NOW() + INTERVAL 1 WEEK), INTERVAL 17 HOUR), INTERVAL 30 MINUTE) WHERE idevent = '2'") …

mysql intervals dateadd
javascript switch using intervals

Can I use intervals in a switch statement? Like switch (parseInt(troops[i])) { case <10: editbox.style.fontSize = "13px"; break; …

javascript switch-statement intervals
Python - Rounding by quarter-intervals

I'm running into the following issue: Given various numbers like: 10.38 11.12 5.24 9.76 does an already 'built-in' function exists to round them up …

python rounding intervals