Search Results

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

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

  • Android Google Analytics dispatch interval

    - by Bear
    In the document, it mentions that we can have a dispatch interval such that page view will be automatically dispatched after x seconds. I have the code like the following tracker.startNewSession("UA-YOUR-ACCOUNT-HERE", 20, this); I sure trackPageView() is called as I can see those pageview are stored into "google_analytics.db" which is the database that google analyitcs used to store non-dispatching pageview. However, it doesn't send to Google Analytics after 20 seconds In log, it keeps reporting scheduling next dispatch when I call trackPageView().

    Read the article

  • JAVA String split on interval

    - by user2920611
    I would like to split my strings in JAVA based on a regular interval, not on regex. This is what I have to split: 1 x3.1.105.41 1 -10 2 x4.1.105.41 0 -10 3 x12.1.105.41 0 -10 4 y3.1.105.41.19 1 0 5 y4.1.105.41.21 0 0 6 y1.1.105.41.23 0 0 7 y12.1.105.41.25 0 0 I would like to seperate each column. Currently, I use the strLine.spli function Any help would be great!

    Read the article

  • Filtering MySQL query result according to a interval of timestamp

    - by celalo
    Let's say I have a very large MySQL table with a timestamp field. So I want to filter out some of the results not to have too many rows because I am going to print them. Let's say the timestamps are increasing as the number of rows increase and they are like every one minute on average. (Does not necessarily to be exactly once every minute, ex: 2010-06-07 03:55:14, 2010-06-07 03:56:23, 2010-06-07 03:57:01, 2010-06-07 03:57:51, 2010-06-07 03:59:21 ...) As I mentioned earlier I want to filter out some of the records, I do not have specific rule to do that, but I was thinking to filter out the rows according to the timestamp interval. After I achieve filtering I want to have a result set which has a certain amount of minutes between timestamps on average (ex: 2010-06-07 03:20:14, 2010-06-07 03:29:23, 2010-06-07 03:38:01, 2010-06-07 03:49:51, 2010-06-07 03:59:21 ...) Last but not least, the operation should not take incredible amount of time, I need this functionality to be almost fast as a normal select operation. Do you have any suggestions?

    Read the article

  • Oracle Date Format Convert Hour-Minute to Interval and Disregard Year-Month-Day

    - by dlite922
    I need to compare an event's half-way midpoint between a start and stop time of day. Right now i'm converting the dates you see on the right, to HH:MM and the comparison works until midnight. the query says: WHERE half BETWEEN pStart and pStop. As you can see below, pStart and pStap have January 1st 2000 dates, this is because the year month day are not important to me... Valid Data: +-------+--------+-------+---------------------+---------------------+---------------------+ | half | pStart | pStop | half2 | pStart2 | pStop2 | +-------+--------+-------+---------------------+---------------------+---------------------+ | 19:00 | 19:00 | 23:00 | 2012-11-04 19:00:00 | 2000-01-01 19:00:00 | 2000-01-01 23:00:00 | | 20:00 | 19:00 | 23:00 | 2012-11-04 20:00:00 | 2000-01-01 19:00:00 | 2000-01-01 23:00:00 | | 21:00 | 19:00 | 23:00 | 2012-11-04 21:00:00 | 2000-01-01 19:00:00 | 2000-01-01 23:00:00 | | 23:00 | 20:00 | 23:00 | 2012-11-05 23:00:00 | 2000-01-01 20:00:00 | 2000-01-01 23:00:00 | +-------+--------+-------+---------------------+---------------------+---------------------+ Now observe what happens when pStop is midnight or later... Valid Data that breaks it: +-------+--------+-------+---------------------+---------------------+---------------------+ | half | pStart | pStop | half2 | pStart2 | pStop2 | +-------+--------+-------+---------------------+---------------------+---------------------+ | 23:00 | 22:00 | 00:00 | 2012-11-04 23:00:00 | 2000-01-01 22:00:00 | 2000-01-01 00:00:00 | | 23:30 | 23:00 | 02:00 | 2012-11-05 23:30:00 | 2000-01-01 23:00:00 | 2000-01-01 02:00:00 | +-------+--------+-------+---------------------+---------------------+---------------------+ Thus my where clause translates to: WHERE 19:00 BETWEEN 22:00 AND 00:00 ...which returns false and I miss those two correct rows above. Question: Is there a way to show those dates as integer interval so that saying half BETWEEN pStart and pStop are correct? I thought about adding 24 when pStop is less than pStart to make 00:00 into 24:00 but don't know an easy way to do that without long string concatenations and number conversions. This would solve the problem because pStart pStop difference will never be longer than 6 hours. Note: (The Query is much more complex. It has other irrelevant date calculations, but the result are show above. DATE_FORMAT(%H:%i) is applied to the first three columns and no formatting to the last three) Thanks for your help:

    Read the article

  • Timer takes 10 ms more then interval

    - by Praveen
    Hi All, I am using a timer with interval 50 miliseconds. But in the timer's tick event when I print the time it's always 62 or 65 ms. I don't understand why it's taking 10 ms more. Please can some one have look into this. Here is the code I am using. static int _counter; System.Timers.Timer _timer = new System.Timers.Timer(1000); public Form1() { InitializeComponent(); _timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed); _timer.Start(); } void _timer_Elapsed(object sender, ElapsedEventArgs e) { Console.WriteLine(DateTime.Now.ToString("{hh:mm:ss.fff}")); _counter++; if (_counter == 20) _timer.Stop(); } And this the output: {01:59:08.381} {01:59:09.393} {01:59:10.407} {01:59:11.421} {01:59:12.435} {01:59:13.449} {01:59:14.463} {01:59:15.477} {01:59:16.491} {01:59:17.505} {01:59:18.519} {01:59:19.533} {01:59:20.547} {01:59:21.561} {01:59:22.575} {01:59:23.589} {01:59:24.603} {01:59:25.615} {01:59:26.629} {01:59:27.643}

    Read the article

  • set/clear interval issue

    - by 3gwebtrain
    HI, i am using the following code to show a link which is inside the li element. the constrain is, once the mouse enter into li element, and if it's stay inside 3sec, then it need to show. once i leave from li element, immateriality it should hide. for this, i am using : var showTimeOut; var thisElement $('.user-list li').live('mouseover',function(){ thisElement = $(this).children('a.copier-link'); showTimeOut = setInterval(function(){ thisElement.css({'display':'block'}); },3000); }) $('.user-list li').live('mouseleave',function(){ clearInterval(showTimeOut); thisElement.hide(); }) It's work fine. But the problem is, while i cross the li element with just a second, even the interval is calling, and showing the link. but i need to show only, if i stay inside 3sec and it need to hide there after, again i stay back 3sec. anything wrong with my code?, else any one give me the best suggestion? Thanks.

    Read the article

  • Round date to 10 minutes interval

    - by Peter Lang
    I have a DATE column that I want to round to the next-lower 10 minute interval in a query (see example below). I managed to do it by truncating the seconds and then subtracting the last digit of minutes. WITH test_data AS ( SELECT TO_DATE('2010-01-01 10:00:00', 'YYYY-MM-DD HH24:MI:SS') d FROM dual UNION SELECT TO_DATE('2010-01-01 10:05:00', 'YYYY-MM-DD HH24:MI:SS') d FROM dual UNION SELECT TO_DATE('2010-01-01 10:09:59', 'YYYY-MM-DD HH24:MI:SS') d FROM dual UNION SELECT TO_DATE('2010-01-01 10:10:00', 'YYYY-MM-DD HH24:MI:SS') d FROM dual UNION SELECT TO_DATE('2099-01-01 10:00:33', 'YYYY-MM-DD HH24:MI:SS') d FROM dual ) -- #end of test-data SELECT d, TRUNC(d, 'MI') - MOD(TO_CHAR(d, 'MI'), 10) / (24 * 60) FROM test_data And here is the result: 01.01.2010 10:00:00    01.01.2010 10:00:00 01.01.2010 10:05:00    01.01.2010 10:00:00 01.01.2010 10:09:59    01.01.2010 10:00:00 01.01.2010 10:10:00    01.01.2010 10:10:00 01.01.2099 10:00:33    01.01.2099 10:00:00 Works as expected, but is there a better way? EDIT: I was curious about performance, so I did the following test with 500.000 rows and (not really) random dates. I am going to add the results as comments to the provided solutions. DECLARE t TIMESTAMP := SYSTIMESTAMP; BEGIN FOR i IN ( WITH test_data AS ( SELECT SYSDATE + ROWNUM / 5000 d FROM dual CONNECT BY ROWNUM <= 500000 ) SELECT TRUNC(d, 'MI') - MOD(TO_CHAR(d, 'MI'), 10) / (24 * 60) FROM test_data ) LOOP NULL; END LOOP; dbms_output.put_line( SYSTIMESTAMP - t ); END; This approach took 03.24 s.

    Read the article

  • Google Bar Chart Time Label Interval

    - by Alex Angelini
    Hi I am using Google Bar Chart through the visualization API on my site: http://code.google.com/apis/visualization/documentation/gallery/imagebarchart.html And my x-axis is time, and every time interval is a time of day in the format (HH:MM) Here is my code for the graph: <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> %s google.load("visualization", "1", {packages:["imagebarchart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Date'); data.addColumn('number', 'Amount'); data.addRows({{Rows}}); %s var chart = new google.visualization.ImageBarChart(document.getElementById('chart_div')); chart.draw(data, {width: 900, height: 340, min: 0, isVertical:true, legend:'none'}); } </script> The rows of data are added later using a templating engine, but that is the jist of my chart. Because I have added my time variable as 'string' I cannot use the valueLabelsInterval option to only show every 4 labels. Because I can't do that the labels overlap and look ugly. Is there any other way to only show every other time label or every 4th one, I read through the docs but could not see how to do it. Any help would be greatly appreciated thanks

    Read the article

  • Calling a method at a specific interval rate in C++

    - by Aetius
    This is really annoying me as I have done it before, about a year ago and I cannot for the life of me remember what library it was. Basically, the problem is that I want to be able to call a method a certain number of times or for a certain period of time at a specified interval. One example would be I would like to call a method "x" starting from now, 10 times, once every 0.5 seconds. Alternatively, call method "x" starting from now, 10 times, until 5 seconds have passed. Now I thought I used a boost library for this functionality but I can't seem to find it now and feeling a bit annoyed. Unfortunately I can't look at the code again as I'm not in possession of it any more. Alternatively, I could have dreamt this all up and it could have been proprietary code. Assuming there is nothing out there that does what I would like, what is currently the best way of producing this behaviour? It would need to be high-resolution, up to a millisecond. It doesn't matter if it blocks the thread that it is executed from or not. Thanks!

    Read the article

  • Non-uniform snap interval on flex slider?

    - by Breck Fresen
    I'm currently using the Flex HSlider control. I'd like the slider to only allow the user to pick the values: [0, .5, 1, 2] I can get it close to what I want by setting the snapInterval to .5 and by explicitly providing the tickValues. But that still allows the value 1.5 to be selected. Is there a way to provide explicit snapValues or to only allow entries in tickValues to be selected? Or do I have to roll my own slider? Thanks in advance, -- Breck

    Read the article

  • jQuery fadein fadeout divs over set interval

    - by theDawckta
    I want to fadeOut the first div in a collection and then fadeIn the next div. The fade in out would trigger at a set time. The number of items in the collection is 1 to n. Here is an example of the html; <div class="contentPanel"> <div class="content"> <div style="border: solid 2px black; text-align: center"> This is first content </div> </div> <div class="content"> <div style="border: solid 2px black; text-align: center"> This is second content </div> </div> <div class="content"> <div style="border: solid 2px black; text-align: center"> This is third content </div> </div> </div> So on page load the first "content" class would be visible, after x amount of time, the current "content" would fadeout and the next "content" would fade in. When it got to the nth "content" it would start over, fadeout the nth "content" and fadein the first "content". This behavior would loop continuously.

    Read the article

  • Search by price interval in currency and other params using Searchlogic

    - by alexandr
    Hi I need to reaqlize search in product model with prices in different currencies (price and currecny_id field). Every currency have own rate. When user search for product in price range [x, y] USD, range must be converted to all currencies and return values like (price > from_eur AND price < to_eur AND currecny_id = 1) OR (price > from_aud AND price < to_aud AND currecny_id = 2) How to realize search like this using searchlogic?

    Read the article

  • Teradata group by time interval

    - by matt123
    Can anyonen help with Teradata? I want to create a query that is a standard select count(*) from Table where Column = Something but has a group by time period done by 5 minute time intervals the time column is in 'Time' format any idea?

    Read the article

  • PHP is not called properly in IE using set interval function in Javascript

    - by Hemant
    Hi all, I am trying to show the message updated in DB using the following code var showtime = setInterval('redirect()',5000); ////Redirecting to DB Status ///// function redirect() { xmlhttp = GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="isResultexist.php" xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } I am collecting the response from PHP here and using it to update the Messages on UI Problem here is it works fine 1st time when it called after 5sec but there after return the Same result even DB is updated, This works fine with Mozilla and google chrome browser regards hemant

    Read the article

  • Group by date range on weeks/months interval

    - by khelll
    I'm using MySQL and I have the following table: | clicks | int | | day | date | I want to be able to generate reports like this, where periods are done in the last 4 weeks: | period | clicks | | 1/7 - 7/5 | 1000 | | 25/6 - 31/7 | .... | | 18/6 - 24/6 | .... | | 12/6 - 18/6 | .... | or in the last 3 months: | period | clicks | | July | .... | | June | .... | | April | .... | Any ideas how to make select queries that can generate the equivalent date range and clicks count?

    Read the article

  • Getting the time interval between typing characters in a TextBox, in C#

    - by sama
    I have a form that has a TextBox and a Label and I want to get the time of the first character entered in the textbox. Then if the user enters more than ten charcaters, the time between the first charcter entered and the tenth charcter entered is displayed in the label. Can any one help me please? I'm using C# Here is the code but I cannot complete it and I have many things that need to be written but I don't know how to continue. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Threading; namespace n { public partial class Form1 : Form { int count=0; public Form1() { InitializeComponent(); } private void textBox1_TextChanged(object sender, EventArgs e) { DateTime t1 = new DateTime();// the time when entering the first charcter DateTime t2 = new DateTime(); t2 = System.DateTime.Now - t1; int index = textBox1.SelectionStart; Point p; p = textBox1.GetPositionFromCharIndex(index); Thread t = new Thread(counttext); t.Start(); label1.Text = "t2"; } private int counttext() { while (textBox1.Text.Length < 10) { count++; if (count == 10) return count; } } } }

    Read the article

  • Obj C - how to customise the interval between slides with IKSlideShow

    - by doraemon
    I'm very new to Objective-C and Cocoa but I've made a simple app which uses ImageKit to present a slideshow using the IKSlideShow class. However I've got a bit stuck with something I thought would be simple. I want to increase the time photos are displayed on screen when the slideshow is playing, but I can't see how to do it effectively. The IKSlideshowDatasource protocol lets you do stuff when "slideshowDidChangeCurrentIndex" which seems to be the best place to do this - however I've tried putting various delays in here such as: while ( functionShouldPause ) { [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:20]]; functionShouldPause=NO; } However they prevent the user for manually moving on the slides, or leaving the slideshow. Very grateful for any suggestions. Thanks!

    Read the article

  • Change Interval Of CADisplayLink

    - by user3679109
    I have replaced an NSTimer with a CADisplayLink. I have it working properly but it is running too slowly. How could I go about speeding this up? This is the code that I'm using: ViewController.h (In {} with @interface: CADisplayLink *displayLink; ViewController.m (viewDidLoad): displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(onTimer)]; [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; onTimer is the method that it is calling. So my question is how do I speed up how often this is being called? Thanks

    Read the article

  • Get the Time Interval without ITimer

    - by ronag
    In my application I am hosting a flash activex control, based on the following implementation. However I need to know in what fps the control is running in when it is "ticked". The only way I know of to do this is to implement ITimerService and ITimer to get the vtimeInterval argument from ITimer::Advise. However, I do not want to control my own custom ITimer, instead I want the control to be timed using the default timer (basically sends WM_USER + 1 messages to the message queue at proper intervals) which is used when a custom ITimer is not provided. How can I read the vTimeInterval while still using the default timer?

    Read the article

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