intervals

Determining the length of a user's visit based on SQL timestamps

Hi everyone, I am divided between using a C# implementation and a pure SQL 2005/2008 implementation. I need to determine the length of usage based on timestamps of their last actions. My table contains "friendID" (uniqueIdentifier) and "lastAction" datetime. Here is an example: Bob, 1:00 PM Bob, 1:01 PM Bob, 1:20 PM Bob, 1:25 PM...

Grouping SQL results by continous 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-31 1 5567 2008-09-01 4712-12-31 2 5569 2008-05-01 2008-08-31 5569 2008-09-01 4712-12-31 5589 2008-04-18 2008-04-30 5589 2008-05-01 4712-12-31 5667 2008-...

Can Excel give a notification if a the value of a cell changes out of limits in a certain time?

I would like to learn if Excel can notify me if the value of a cell is changed out of a limit within a certain interval? Example: Cell A1 has a value of 10, the limits are +1 and -1, the interval is 1 minute Now I would like to be notified if the value of A1 changes below 9 or above 11 within the interval of 1 minute Does anyone know i...

How I can select / sort dates by period intervals ?

For ex: If we have in table records like: 25/06/2009 28/12/2009 19/02/2010 16/04/2011 20/05/2012 I want to split/select this dates according to 6 month intervals starting from current date. result should be like: 0-6 month from now: first record 7-12 month from now: second record ... It will be much apreciated if you make this simp...

Point on non-linear range to linear and back?

Greeting, I'm trying to solve the following puzzle: I have a list of linear ranges which represent one big range. X' 100 200 300 400 500 600 700 | 900 (X) |----------|----------|----------|--------+----------| 0 | 100 (Y) ...

two or more timer with different intervals with C#

Hi guys, I have to a d.b entry in which the intervals are given, Suppose 1 timer tm_5 will check the entries after every 5 mins & the timer tm_10 will check the entries after every 10 mins, The problem is that it checks only the entries for tm_5 not for the tm_10. I am using C#.net 2005 & MS sql server 2005. Guys please me with f...

Minimizing the number of boxes that cover a given set of intervals

Hi, this is a question for the algorithms gurus out there :-) Let S be a set of intervals of the natural numbers that might overlap and b a box size. Assume that for each interval, the range is strictly less than b. I want to find the minimum set of intervals of size b (let's call it M) so all the intervals in S are contained in the in...

notification scheduling question

Hi Stackers! I'm building an app that needs to send out notifications to users depending on user definable "notifications". So the notifications are not per event. They are arbitrary. A cron job should query the database and send out emails when it finds an event with matching criterion. The is a scheduling app. So naturally, one of th...

[javascript] Good (better) substition for setInterval or setTimeout

I've got a masterpage with some nice UI (jQuery) features. One of these options is interefering with my embedded YouTube (or other alike-) objects. On each, in this case, setInterval event the embedded video stops displaying new frames (for like a second). More detail: I've got a "polaroid" gallery (in the header) with only 5 100x100 im...

javascript switch using intervals

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

Efficient algorithm to find String overlaps.

I won't go into the details of the problem I'm trying to solve, but it deals with a large string and involves finding overlapping intervals that exist in the string. I can only use one of the intervals that overlap, so I wanted to separate these intervals out and analyze them individually. I was wondering what algorithm to use to do this...