Search Results

Search found 1235 results on 50 pages for 'interval'.

Page 1/50 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Interval tree algorithm that supports merging of intervals with no overlap

    - by Dave Griffiths
    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 just one interval [2,6]. Thanks Update: the use case I'm considering is calculating transitive closure. Interval sets are used to store the successor sets because they have been found to be quite compact. But if you represent interval sets just as a linked list I have found that in some situations they can become quite large and hence so does the time required to find the insertion point. Hence my interest in interval trees. Also there may be quite a lot of merging one tree with another (i.e. a set OR operation) - if both trees are large then it may be better to create a new tree using inorder walks of both trees rather than repeated insertions of each interval.

    Read the article

  • How to check if a Webcam is broken?

    - by user84812
    I just bought an Acer Aspire 3830TG, it comes with an integrated 1.3M HD Webcam. Before buying it i tried with a bootable Lubuntu usb stick, everything worked well except for the webcam, which i thought I had to tweak. The thing is that it seems the camera should work with no problems in ubuntu. The driver is detected, I try dmesg | grep uvcvideo and the output is [ 12.226174] uvcvideo: Found UVC 1.00 device 1.3M HD WebCam (058f:b002) [ 12.245553] usbcore: registered new interface driver uvcvideo I've also tried using different software (guvcview is black when camera output is MJPG and turns to funny colors when YU12 or YV12, cheese is always black, camorama is always with funny colors...). I should have checked that it was working properly with the default os (windows) but now it's too late for that. I even booted with a official Ubuntu Quantal distro from the usb pen, and the results are the same. so, my question is: is there any way to check that the camera is righmt or broken? So, if it's broken, at least i can go to the shop, show them that it's really broken and get an external webcam for free, or st like that. cheers. UPDATE 1 Thanks, jrp. I run sudo lsinput, and the output info about my video is the following: /dev/input/event6 bustype : BUS_USB vendor : 0x58f product : 0xb002 version : 2 name : "1.3M HD WebCam" phys : "usb-0000:00:1a.0-1.3/button" bits ev : EV_SYN EV_KEY /dev/input/event7 bustype : BUS_HOST vendor : 0x0 product : 0x6 version : 0 name : "Video Bus" phys : "LNXVIDEO/video/input0" bits ev : EV_SYN EV_KEY With this info, i'm not pretty sure about running the luvcview command. If I run luvcview -d /dev/video0 -L, the output is the following: SDL information: Video driver: x11 A window manager is available Device information: Device path: /dev/video0 { pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' } { discrete: width = 640, height = 480 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 160, height = 120 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 176, height = 144 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 352, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 720 } Time interval between frame: 1/7, 1/5, { discrete: width = 1280, height = 800 } Time interval between frame: 1/7, 1/5, { discrete: width = 1280, height = 960 } Time interval between frame: 1/7, 1/5, { discrete: width = 1280, height = 1024 } Time interval between frame: 1/7, 1/5, { pixelformat = 'MJPG', description = 'MJPEG' } { discrete: width = 640, height = 480 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 160, height = 120 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 176, height = 144 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 352, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 720 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 800 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 1280, height = 960 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 1280, height = 1024 } Time interval between frame: 1/15, 1/10, 1/5, { pixelformat = 'RGB3', description = 'RGB3' } { discrete: width = 640, height = 480 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 160, height = 120 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 176, height = 144 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 352, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 720 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 800 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 1280, height = 960 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 1280, height = 1024 } Time interval between frame: 1/15, 1/10, 1/5, { pixelformat = 'BGR3', description = 'BGR3' } { discrete: width = 640, height = 480 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 160, height = 120 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 176, height = 144 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 352, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 720 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 800 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 1280, height = 960 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 1280, height = 1024 } Time interval between frame: 1/15, 1/10, 1/5, { pixelformat = 'YU12', description = 'YU12' } { discrete: width = 640, height = 480 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 160, height = 120 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 176, height = 144 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 352, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 720 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 800 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 1280, height = 960 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 1280, height = 1024 } Time interval between frame: 1/15, 1/10, 1/5, { pixelformat = 'YV12', description = 'YV12' } { discrete: width = 640, height = 480 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 160, height = 120 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 176, height = 144 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 352, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 720 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 800 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 1280, height = 960 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 1280, height = 1024 } Time interval between frame: 1/15, 1/10, 1/5, if i run luvcview by itself, the image is funny (blue and red colors, mainly, with myself in negative state). tx

    Read the article

  • interval overlapping in tsql

    - by Nico
    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 determine what intervals are intersected at first. result should be something like: 1: 10:00 - 12:00 ( intersecting with interval A ) 2: 10:00 - 12:00 ( intersecting with interval B ) 3: 12:00 - 15:00 ( intersecting with interval C ) 4: 13:00 - 14:00 ( intersecting with interval D ) this part works fine, the following causes the trouble: i need some kind of weighting for parallel intervals. this also means, that it can occur that an interval-intersection must be splitted n times, if it's ( partly ) intersected by another one. in the upper example the expecting result would be: 1: 10:00 - 12:00 -> weightage: 50% 2: 10:00 - 12:00 -> weightage: 50% 3.1: 12:00 - 13:00 -> weightage: 1oo% 3.2: 13:00 - 14:00 -> weightage: 50% 3.3: 14:00 - 15:00 -> weightage: 50% 4: 13:00 - 14:00 -< weightage: 100% the splitting of interval 3 is caused by the intersecting with interval 4 between 13:00 and 14:00. sql-server is ms-sql 2008. thanks for help in advance!

    Read the article

  • Normal check interval and re try check interval doesnot work in nagios

    - by chandra
    Hi Guys, I have configured nagios in my environment and i have used the following setting for a service which monitors the disk space for every 10 min , Normal check interval =10 min retry check interval = 1 min Maximum attempts =2 But accoring to this values i should recieve my first alert after 10 min and then from there for every 1 min. But in my case i am recieving my first alert and then next alert comes to me after 20 min. Can some one help me in fixing this.

    Read the article

  • Normal check interval and re try check interval doesnot work in nagios

    - by chandra
    I have configured nagios in my environment and i have used the following setting for a service which monitors the disk space for every 10 min , Normal check interval =10 min retry check interval = 1 min Maximum attempts =2 But accoring to this values i should recieve my first alert after 10 min and then from there for every 1 min. But in my case i am recieving my first alert and then next alert comes to me after 20 min. Can some one help me in fixing this.

    Read the article

  • using isight camera in macbookpro(8,2) on ubuntu 12.04 virtualbox VM

    - by Kurt Spindler
    I'm having a lot of trouble using the built-in isight camera on my macbookpro8,2 (early 2011) from an ubuntu 12.04 virtual machine, run inside VirtualBox. The following is the log I get when I try to run guvcview ubuntu@ubuntu:~$ guvcview guvcview 1.5.3 ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71 ALSA lib setup.c:565:(add_elem) Cannot obtain info for CTL elem (MIXER,'IEC958 Playback Default',0,0,0): No such file or directory ALSA lib setup.c:565:(add_elem) Cannot obtain info for CTL elem (MIXER,'IEC958 Playback Default',0,0,0): No such file or directory ALSA lib setup.c:565:(add_elem) Cannot obtain info for CTL elem (MIXER,'IEC958 Playback Default',0,0,0): No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5) ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream Cannot connect to server socket err = No such file or directory Cannot connect to server socket jack server is not running or cannot be started video device: /dev/video0 Init. FaceTime HD Camera (Built-in) (location: usb-0000:00:0b.0-1) { pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' } { discrete: width = 160, height = 120 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 176, height = 144 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 320, height = 240 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 352, height = 288 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 640, height = 480 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1280, height = 720 } Time interval between frame: 1/10, { pixelformat = 'MJPG', description = 'MJPEG' } { discrete: width = 960, height = 540 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1024, height = 576 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1280, height = 720 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { pixelformat = 'RGB3', description = 'RGB3' } { discrete: width = 160, height = 120 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 176, height = 144 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 320, height = 240 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 352, height = 288 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 640, height = 480 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1280, height = 720 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 960, height = 540 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1024, height = 576 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { pixelformat = 'BGR3', description = 'BGR3' } { discrete: width = 160, height = 120 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 176, height = 144 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 320, height = 240 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 352, height = 288 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 640, height = 480 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1280, height = 720 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 960, height = 540 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1024, height = 576 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { pixelformat = 'YU12', description = 'YU12' } { discrete: width = 160, height = 120 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 176, height = 144 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 320, height = 240 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 352, height = 288 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 640, height = 480 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1280, height = 720 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 960, height = 540 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1024, height = 576 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { pixelformat = 'YV12', description = 'YV12' } { discrete: width = 160, height = 120 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 176, height = 144 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 320, height = 240 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 352, height = 288 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 640, height = 480 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1280, height = 720 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 960, height = 540 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, { discrete: width = 1024, height = 576 } Time interval between frame: 100/2997, 1/25, 1/24, 1/15, vid:05ac pid:8509 driver:uvcvideo checking format: 1196444237 VIDIOC_G_COMP:: Invalid argument compression control not supported fps is set to 1/25 drawing controls no codec detected for H264 no codec detected for MP3 - (lavc) Checking video mode 960x540@32bpp : OK Could not grab image (select timeout): Resource temporarily unavailable Could not grab image (select timeout): Resource temporarily unavailable Could not grab image (select timeout): Resource temporarily unavailable Could not grab image (select timeout): Resource temporarily unavailable Could not grab image (select timeout): Resource temporarily unavailable Could not grab image (select timeout): Resource temporarily unavailable Could not grab image (select timeout): Resource temporarily unavailable Could not grab image (select timeout): Resource temporarily unavailable Could not grab image (select timeout): Resource temporarily unavailable write /home/ubuntu/.guvcviewrc OK free controls cleaned allocations - 100% Closing portaudio ...OK Closing GTK... OK ubuntu@ubuntu:~$ Any help would be greatly appreciated. Only clue I have is that I initially was having problems, tried using the old method of fixing isights (involving installing isight-firmware-tools) before realizing that I just hadn't turned on the VM setting to allow the VM to access the webcam. :) Anyway, I wonder if installing that messed something up. However, I think this is a red herring because I've: shut down and turned back on the Mac, restarted the VM, tried a different VM (for which I never installed isight-firmware-tools, and created an entirely new ubuntu vm. All instances have had this problem. Similarly, other viewers, such as cheese, avplay, avconv have had all various kinds of errors.

    Read the article

  • mySQL query : working with INTERVAL and CURDATE

    - by Tristan
    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 DESC But, in my case i've to write 12 request to recieve datas for the 12 previous months, is there any trick to avoid writing : // example for the previous month AND v.date > CURDATE() -60 AND v.date < CURDATE () -30 I heard about INTERVAL, i went to the mySQL doc but i didn't manage to implement it. Any ideas / example of using INTERVAL please ? Thank you

    Read the article

  • python interval

    - by Apache
    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

    Read the article

  • Jquery date in a adropdown with interval

    - by Zoom Pat
    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. What will be the best or a cleaner way to do this... (want to display in the dropdown) Thanks

    Read the article

  • Jquery date in a dropdown with interval

    - by Zoom Pat
    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. What will be the best or a cleaner way to do this... (want to display in the dropdown) Thanks

    Read the article

  • MySQL DATE_ADD usage, 5 day interval

    - by Webnet
    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, INTERVAL +1 DAY) AND userId = '.$userId.$whereSql I'm not entirely sure DATE_ADD is the right function I'm looking for I'm fairly new to mysql date functions so perhaps I just missed the function I needed when going through mysql docs.

    Read the article

  • sqlite3 date and interval functions

    - by umuthorax
    Hi, I wonder whether sqlite3 supports interval function. The following statement is accepted by PostgreSQL, however sqlite3 failed to parse it; select ... from orders where ... and o_orderdate < date '1995-03-01' + interval '3' month Error: near line 4: near "'1995-03-01'": syntax error Then, I modified the statement a little bit such as; and o_orderdate < date('1995-03-01') + interval '3' month This time the error was; Error: near line 4: near "'3'": syntax error Unfortunately, same trick did not work for the interval function i.e. and o_orderdate < date('1995-03-01') + interval('3' month) or and o_orderdate < date('1995-03-01') + interval('3') month or even and o_orderdate < date('1995-03-01') + interval(3 month) still gave me the syntax error. Maybe sqlite3 does not support interval function or am I missing something in its usage? Thanks a lot

    Read the article

  • Precision of Interval for PL/SQL Function value

    - by Gary
    Generally, when you specify a function the scale/precision/size of the return datatype is undefined. For example, you say FUNCTION show_price RETURN NUMBER or FUNCTION show_name RETURN VARCHAR2. You are not allowed to have FUNCTION show_price RETURN NUMBER(10,2) or FUNCTION show_name RETURN VARCHAR2(20), and the function return value is unrestricted. This is documented functionality. Now, I get an precision error (ORA-01873) if I push 9999 hours (about 400 days) into the following. The limit is because the default days precision is 2 DECLARE v_int INTERVAL DAY (4) TO SECOND(0); FUNCTION hhmm_to_interval return INTERVAL DAY TO SECOND IS v_hhmm INTERVAL DAY (4) TO SECOND(0); BEGIN v_hhmm := to_dsinterval('PT9999H'); RETURN v_hhmm; -- END hhmm_to_interval; BEGIN v_int := hhmm_to_interval; end; / and it won't allow the precision to be specified directly as part of the datatype returned by the function. DECLARE v_int INTERVAL DAY (4) TO SECOND(0); FUNCTION hhmm_to_interval return INTERVAL DAY (4) TO SECOND IS v_hhmm INTERVAL DAY (4) TO SECOND(0); BEGIN v_hhmm := to_dsinterval('PT9999H'); RETURN v_hhmm; -- END hhmm_to_interval; BEGIN v_int := hhmm_to_interval; end; / I can use a SUBTYPE DECLARE subtype t_int is INTERVAL DAY (4) TO SECOND(0); v_int INTERVAL DAY (4) TO SECOND(0); FUNCTION hhmm_to_interval return t_int IS v_hhmm INTERVAL DAY (4) TO SECOND(0); BEGIN v_hhmm := to_dsinterval('PT9999H'); RETURN v_hhmm; -- END hhmm_to_interval; BEGIN v_int := hhmm_to_interval; end; / Any drawbacks to the subtype approach ? Any alternatives (eg some place to change a default precision) ? Working with 10gR2.

    Read the article

  • Showplan Operator of the Week - Merge Interval

    When Fabiano agreed to undertake the epic task of describing each showplan operator, none of us quite predicted the interesting ways that the series helps to understand how the query optimizer works. With the Merge Interval, Fabiano comes up with some insights about the way that the Query optimizer handles overlapping ranges efficiently. Free trial of SQL Backup™“SQL Backup was able to cut down my backup time significantly AND achieved a 90% compression at the same time!” Joe Cheng. Download a free trial now.

    Read the article

  • ubuntu 12.04.3 - Reverse DNS issue - slow ping interval but normal ping value

    - by McArthor Lee
    i'm running ubuntu 12.04.3 x86 desktop in my corporation environment. I join the corp domain by Likewise open. But when I ping another pc, say hostname is pc-test, "ping pc-test" or "ping pc-test.domain.name" returns slow interval (about 5 seconds) but the ping value is below 1 ms. When I use "ping -n pc-test", everything works well. So I conclude this is about reverse DNS issue. how to fix this issue? many thanks! Edit: In my understanding, reverse DNS issue is related to DNS server or Wins server, not only an ubuntu issue, is this right? if I wanna fix this issue as much as possible on ubuntu but not on network servers, what to do?

    Read the article

  • SQL SERVER – Function to Round Up Time to Nearest Minutes Interval

    - by pinaldave
    Though I have written more than 2300 blog posts, I always find things which I have not covered earlier in this blog post. Recently I was asked if I have written a function which rounds up or down the time based on the minute interval passed to it. Well, not earlier but it is here today. Here is a very simple example of how one can do the same. ALTER FUNCTION [dbo].[RoundTime] (@Time DATETIME, @RoundToMin INT) RETURNS DATETIME AS BEGIN RETURN ROUND(CAST(CAST(CONVERT(VARCHAR,@Time,121) AS DATETIME) AS FLOAT) * (1440/@RoundToMin),0)/(1440/@RoundToMin) END GO Above function needs two values. 1) The time which needs to be rounded up or down. 2) Time in minutes (the value passed here should be between 0 and 60 – if the value is incorrect the results will be incorrect.) Above function can be enhanced by adding functionalities like a) Validation of the parameters passed b) Accepting values like Quarter Hour, Half Hour etc. Here are few sample examples. SELECT dbo.roundtime1('17:29',30) SELECT dbo.roundtime1(GETDATE(),5) SELECT dbo.roundtime1('2012-11-02 07:27:07.000',15) When you run above code, it will return following results. Well, do you have any other way to achieve the same result? If yes, do share it here and I will be glad to share it on blog with due credit. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL DateTime, SQL Function, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • trouble setting node['chef-client']['interval']

    - by atiniir
    I've searched many places and haven't get found the answer to this, I suspect I'm missing something either fundamental or basic (maybe both) I'm using the chef-client::windows_service recipe and trying to set the interval and can't seem to sort it out. I've tried at the role level with: { "defaults": { "chef_client": { "interval":15 } }, "overrides":{ } } and at the node level with: { "chef_client": { "interval":25 }, "tags":[] } but the interval on the node is still 1800 (default)

    Read the article

  • Copy website content from WebsiteA.com/file.html to WebsiteB/file.com every time interval

    - by Jimbo Mombasa
    I want to copy a website from http://stats.pingdom.com/file... to http://mywebsite.com/file every 10 min. Then with purple-include I want to do a transclusion and display it on http://mywebsite.com/page.html So the task is download http://stats.pingdom.com/file to http://mywebsite.com/file I figured out the transclusion part but I do not know how to copy a wabpage from A to B. Are there any script for this or how can I do this?

    Read the article

  • Change the brightness adjustment interval

    - by TreefrogInc
    So whenever I hit my dim/brighten keys on the keyboard, a notification bubble pops up with the screen brightness. All that's fine, but I would like to be able to change how much the brightness changes with each key press. For example, right now it takes just 5 presses to go from the completely dark to the brightest setting. However, I know from the "Brightness/Lock" setting that the screen is capable of much smaller intervals than this. Is there a way to change how much the brightness jumps each time the keys are pressed?

    Read the article

  • efficiently determining if a polynomial has a root in the interval [0,T]

    - by user168715
    I have polynomials of nontrivial degree (4+) and need to robustly and efficiently determine whether or not they have a root in the interval [0,T]. The precise location or number of roots don't concern me, I just need to know if there is at least one. Right now I'm using interval arithmetic as a quick check to see if I can prove that no roots can exist. If I can't, I'm using Jenkins-Traub to solve for all of the polynomial roots. This is obviously inefficient since it's checking for all real roots and finding their exact positions, information I don't end up needing. Is there a standard algorithm I should be using? If not, are there any other efficient checks I could do before doing a full Jenkins-Traub solve for all roots? For example, one optimization I could do is to check if my polynomial f(t) has the same sign at 0 and T. If not, there is obviously a root in the interval. If so, I can solve for the roots of f'(t) and evaluate f at all roots of f' in the interval [0,T]. f(t) has no root in that interval if and only if all of these evaluations have the same sign as f(0) and f(T). This reduces the degree of the polynomial I have to root-find by one. Not a huge optimization, but perhaps better than nothing.

    Read the article

  • Grouping timestamps by interval between timestamps, then calculating from group MySQL

    - by Emile
    To put this question into context, I'm trying to calculate "time in app" based on an event log. Assume the following table: user_id event_time 2 2012-05-09 07:03:38 3 2012-05-09 07:03:42 4 2012-05-09 07:03:43 2 2012-05-09 07:03:44 2 2012-05-09 07:03:45 4 2012-05-09 07:03:52 2 2012-05-09 07:06:30 I'd like to get the difference between the highest and lowest event_time from a set of timestamps that are within 2 minutes of eachother (and grouped by user). If a timestamp is outside of a 2 minute interval from the set, it should be considered a part of another set. Desired output: user_id seconds_interval 2 7 (because 07:03:45 - 07:03:38 is 7 seconds) 3 0 (because 07:03:42) 4 9 (because 07:03:52 - 2012-05-09 07:03:43) 2 0 (because 07:06:30 is outside 2 min interval of 1st user_id=2 set) This is what I've tried, although I can't group on seconds_interval (even if I could, I'm not sure this is the right direction): SELECT (max(tr.event_time)-min(tr.event_time)) as seconds_interval FROM some_table tr INNER JOIN TrackingRaw tr2 ON (tr.event_time BETWEEN tr2.event_time - INTERVAL 2 MINUTE AND tr2.event_time + INTERVAL 2 MINUTE) GROUP BY seconds_interval

    Read the article

  • HP Laserjet "maintenance interval" vs "fuser life"

    - by marienbad
    I posted a question about the Laserjet 8100DN earlier here: http://serverfault.com/questions/139043/buying-an-old-laser-printer-what-will-need-to-be-replaced and from doing some more research I have a new question: I found the "maintence interval" -- "the interval at which you should install a maintenance kit" (which is a fuser and rollers), and it is...350,000 pages. BUT, when I look at the specs for an HP 8100 fuser, it says the fuser has a life span of 150,000 pages. What gives? – Will the fuser go bad after 150 or 350? ==== BTW I hope it's ok to ask another similar question in a new thread -- I'm just following instructions from my thread on the topic at Meta.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >