interval

jQuery DIV refresh

I'm using the simple jQuery DIV refresh code. var refreshId = setInterval(function() { $('#refreshdash').load('dashboard.php?cache='); }, 4000); Right? Some guy informed me that adding "?cache=" to the end of the file that you going to have refreshed, will help lower bandwidth, etc, as he told me that it caches the file or ...

Create a jQuery special event for content changed

I'm trying to create a jQuery special event that triggers when the content that is bound, changes. My method is checking the content with a setInterval and check if the content has changed from last time. If you have any better method of doing that, let me know. Another problem is that I can't seem to clear the interval. Anyway, what I n...

How to get unix timestamp interval between two datetime values most efficiently in MySQL?

This way surely works,but it calls UNIX_TIMESTAMP 2 times: mysql> select UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP('2009-09-23 22:07:42'); +---------------------------------------------------------------+ | UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP('2009-09-23 22:07:42') | +---------------------------------------------------------------+ | ...

Checking whether clearInterval has been called?

Given this code: bob = setInterval(function, 1000); clearInterval(bob); Is there now a way to know if that interval has been cleared? Currently, I keep track of this myself, by unsetting 'bob', but I'm curious if my extra line of code is unnecessary: clearInterval(bob); bob = null; if (!bob) itIsCleared(); Thanks! ...

Oracle Date subtraction with SQLLDR

Hi, I am trying to import NetBackup statistics into Oracle. One field I really want is ACTIVE START, but it isn't available from bpdbjobs -report. What is available is ACTIVEELAPSED, so I want to subtract that from the END TIME on import as follows: END TIME Format: 26/09/2009 10:46:20 PM ELAPSED TIME Format: 028:32:35 (which is hours...

css width interval

Ok, here's a problem I've never run into before. I would like to use CSS to specify that an elements width should always be in 10 pixel intervals. So, for example, if the width of an element is 11, it would get bumped up to 20, 56 => 60, 138 => 140, etc... I doubt CSS has a way to do this but thought I'd ask anyway. Something like this ...

GDI+ gif speed problem.

I am using C++ GDI+ to open a gif however I find the frame interval is really strange. It is different from played it by window's pic viewer. The code I written is as follow. pMultiPageImg = new Bitmap(XXXXX); int size = m_pMultiPageImg->GetPropertyItemSize(PropertyTagFrameDelay); m_pTimeDelays = (PropertyItem*) malloc (size); m_pMult...

Hadoop: intervals and JOIN

Hi all, I'm very new to Hadoop and I'm currently trying to join two sources of data where the key is an interval (say [date-begin/date-end]). For example: input1: 20091001-20091002 A 20091011-20091104 B 20080111-20091103 C (...) input2: 20090902-20091003 D 20081015-20091204 E 20040011-20050101 F (...) I'd like to...

Calculate time interval between 2 dates on different rows.

Hello. I have login and logout events and i need to calculate time between them. I guess i could group each 2 rows (each two messages) and then do the calculation, but how would you do that? Example XML i need to query: <Log> <Message> <DateTime>2009-12-02 14:38:41</DateTime> <Priority>Local3.Info</Priority> <Source_Hos...

How to calcuate elapsed time in terms of minutes in MySQL

There is a time stamp column/field in a table, and the format is like 2009-12-05 10:35:28, Now I want to get the time in terms of minutes(How many minutes have elapsed) elapsed from then on, how to do it? ...

Trying to generate several digit intervals in one number (LUA)

Basically I have to use a random function that can return a number between 0 and 2^16-1. I am trying to make use of this and generate let's say, 6 intervals between 1 and 6 (thinking of dice poker). Basically use that one number that is randomly generated for me (I can specify range only) and preferably only have to call it once. Then t...

Query to select intervals from a table

I have a table that defines time intervals. _______________________________ | id | description | start_date | |____|_____________|____________| | 1 | First | NULL | | 3 | Third | 2009-12-18 | | 5 | Second | 2009-10-02 | | 4 | Last | 2009-12-31 | |____|_____________|____________| It stores only the s...

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) > t_start(i+1). I want to do the following operations: 1) Add new (Union of) intervals [ {(1,4),(8,10)} U (3,7) = {(1,7),(8,10)} ] 2) Take intervals out [ (1,7) - (3,5) = {(1,3),(5,7)} 3) Checking whether a point or a interval overlaps with an int...

Interval of one month back not working on the 31st?

Essentially, I have a query that is responsible for fetching all records (with specific filters) within the last month. I'm using Oracle's interval keyword and all was working great until today (December 31st, 2009). The code I'm using is select (sysdate - interval '1' month) from dual and the error I get it ORA-01839: date not valid...

Where can I find the range interval partition tablespaces in the data dictionary?

For a range interval partitioned table, you can specify multiple tablespaces like: CREATE TABLE range_part_interval_table(col1 NUMBER, col2 NUMBER) PARTITION BY RANGE (col1) INTERVAL (10) STORE IN (ts2, ts3, ts4) (PARTITION VALUES LESS THAN (100) TABLESPACE ts1); But I can't find where the interval tablespaces are stored in the data d...

C# Executing timed commands with varying times

I have a timer control and a grid with a List of coordinates for the grid. I was wondering how I could use the timer control or any other control in order to execute code in the interval, coordinate.Time as it varies for each coordinate. Also, thread.sleep(time) is not an option for me. foreach (Coordinate coordinate in this.Macro) ...

Functions for value intervals

I'm currently dealing with a lot of possibly indefinite date spans, ie. StartDate EndDate --------- --------- 01JAN1921 31DEC2009 10OCT1955 null ... where the other end of the interval might be unknown or not defined. I've been working on little functions for detecting overlap, whether an interval is a subinterval of a...

python datetime.time operation

t1 = datetime.time(12, 10, 0, tzinfo=GMT1()) # 12:10 t2 = datetime.time(13, 13, 0, tzinfo=GMT1()) #13:13 t3 = datetime.time(23, 55, 0, tzinfo=GMT1()) #23:55 t4 = datetime.time(01, 10, 0, tzinfo=GMT1()) #01:10 I need the minute interval between between two times. For instance a non working one: def minute_interval(start,end): re...

Fusion Charts Y axis interval

Hi, I am using Fusion charts with javascript and I have a small issue. if the datarange for the chart is 100 for example, and one element has 98, but the other 5 elements have values ranging from 1 to 10. These five elements are going to display very small. Is there any way that I can control the Y axis intervals, so that one interva...

Jquery date in a dropdown with interval

I am trying to use Jquery to display dates in a dropdown with interval of half month... so the first value would be the coming month's 1st, then second will be the coming month's 15th and third value would be next to next month's first and so on... If today date is less than 15th then the first value would be the 15th of current month....