interval

time interval in c#

I am having start time and end time as two fields in my database of type Datetime, Now i want that start time and end time selected by user should not fall within the interval of start time and end time that are already present in database. How to do this validation. ...

interval overlapping in tsql

hi folks, i need to get splited intervals and the number of overlapping intervals, eg basedata: interval A: startTime 08:00, endTime 12:00 interval B: startTime 09:00, endTime 12:00 interval C: startTime 12:00, endTime 16:00 interval D: startTime 13:00, endTime 14:00 now i have a separate interval from 10:00 to 15:00 and have to de...

Make a range in postgres

Hi, how can I make a range in a select in PostgreSQL ? I'd like to have this return: num --- 1 2 3 4 5 6 In a query like: SELECT range(1,6) AS num; ...

Interval tree algorithm that supports merging of intervals with no overlap

I'm looking for an interval tree algorithm similar to the red-black interval tree in CLR but that supports merging of intervals by default so that there are never any overlapping intervals. In other words if you had a tree containing two intervals [2,3] and [5,6] and you added the interval [4,4], the result would be a tree containing ju...

python interval

hi expert, i've dev code for wifi scanning in python, now i trying to modify my code so it will scan wifi at specific interval, how this can be done thanks ...

MySQL DATE_ADD usage, 5 day interval

I'm trying to select the order total sum ($) and invoice count over a 5 day period in a single query. I can't seem to get this to happen though. The current query I have is here... SELECT COUNT(id) as invoice_count, SUM(orderTotal) as orders_sum, UNIX_TIMESTAMP(created) as created FROM ids_invoice WHERE DATE_ADD(created, I...

How to add markers on Google Maps polylines based on distance along the line?

I am trying to create a Google Map where the user can plot the route he walked/ran/bicycled and see how long he ran. The GPolyline class with it’s getLength() method is very helpful in this regard (at least for Google Maps API V2), but I wanted to add markers based on distance, for example a marker for 1 km, 5 km, 10 km, etc., but it see...

mySQL query : working with INTERVAL and CURDATE

Hello, i'm building a chart and i want to recieve data for each months Here's my first request which is working : SELECT s.GSP_nom AS nom, timestamp, AVG( v.vote + v.prix ) /2 AS avg FROM votes_serveur AS v INNER JOIN serveur AS s ON v.idServ = s.idServ WHERE s.valide =1 AND v.date > CURDATE() -30 GROUP BY s.GSP_nom ORDER BY avg DE...

Update count every second causing massive memory problems

Just on my local machine, trying the run the following script causes my computer to crash... What am I doing wrong? (function($) { var count = '6824756980'; while (count > 0) { setInterval(function() { $('#showcount').html(Math.floor(count-1)); c...

JavaScript apparently waits for each AJAX call before sending another in a loop

Hello. Straight to the point: I have this javascript: for(item=1;item<5;item++) { xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET",'zzz.php', true); xmlhttp.send(); } And in PHP file something like this: usleep(5);die('ok'); Now the problem is javascript seems to be waiting for each ajax call to be completed before send...

obj-c : iphone programming NSTimeInterval problem

hi, i got a problem with my time interval. I need to get the interval of two times in this format : HH:MM. If i enter : 15:35 and 16:35 it is ok, but when i do 20:30 to 01:30, it gives me like 18 hours interval.. anyone have an idea? NSString *startDate= starthere.text; NSString *endDate = endhere.text; NSDateFormatter...

How can I stop a jQuery function on hover?

I have a jQuery function that is running on setInterval(); What I want to do is stop the interval when I hover over the div being displayed, and once I hover off the div, start the interval again (aka continue cycling through the divs). any idea on how to do this in the simplest form possible? Thanks! Amit ...

Stopping jQuery cycle function on hover

Hi everyone, I have a function called testimonials() that basically cycles through a set of divs, whereas it animates a div in, animates it out and animates the next one in. Now, I wanted to make it stop on the current DIV once the mouse is on it, otherwise known as hovering it. And I've made it work using a code I got from another pos...

Comparing the Oracle Interval Data Type

I have an oracle time interval in a select statement like this: SELECT ... CASE WHEN date1 - date2 > 0 THEN 'No' ELSE 'YES' END This fails with an invalid data type. So I tried this, and it still fails. SELECT ... CASE WHEN date1 - date2 > (sysdate - sysdate) THEN 'No' ELSE 'YES' END Is there any way t...

Easiest way to repeatedly call a custom function in Jquery while hovering?

I have a function called goRight() which does some stuff when I click a div called "goright". I want to make it so that when I hover over the div "goright" it will call the function repeatedly (with a small delay) for as long as I'm hovering, and then do nothing and stop once i move the mouse away. I have experimented with setInterval ...

Check time interval using SQL condition

I'm storing some intervals in the SQL, example: id INT from DATE to DATE How can I check, using only one condition (if possible) if a NEW interval conflict with a existing one? Examples: |-----------| (from 1 to 5) |-----------| (from 2 to 6) |--| (from 3 to 4) |--| (from 7 to 8) Every interval (in th...

how about android interval

hi expert, i did wifi scanning for android, but now i want this wifi scanning run at set interval period, how this can be done, can any provide any snippets, thanks in advance ...

What is a decent update interval for a web crawler?

I am currently working on my own little web crawler thingy and was wondering... What is a decent interval for a web crawler to visit the same sites again? Should you revisit them once a day? Once per hour? I really do not know...has anybody some experience in this matter? Perhaps someone can point me into the right direction? ...

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 score. I need to return the maximum possible total score. The catch is that the intervals overlap, and of the overlapping intervals I can use only one. Here is an example. Intervals - Score 0- 5 - 15 4- 9 - 18 ...

How do i refresh my Twitter API every 15 seconds?

I was successful in installing the TWITTER API jquery script, but I can't figure out how to make the script refresh with the latest tweets without refreshing the entire page IN 15 SECOND INTERVALS. Is it possible to use a .load or refreshID to reload script? Can I also include a fade in and fade out when the function reloads? Anyone d...