Search Results

Search found 460 results on 19 pages for 'tick'.

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

  • C# timer won't tick

    - by Andrej
    hi, i have a strange problem... I've been going out of my mind for the past couple of hours... the timer i put in my winform code (from the toolbar) won't tick... I have timers on a couple of forms in my program, they all work fine... I try to do exactly the same it this it won't tick... I select it, drag it on to a form, enable it, set interval and handle the tick event... and nothing happens... i even tried putting random code like messagebox.show in the tick event just to see if anything happens, and nothing!!! as I said, a have a couple of more timer in my program (on other forms, not in the one i'm trying to put this timer) and they all work fine... any suggestions? thanks in advance!

    Read the article

  • xts error - order.by requires an appropriate time-based object

    - by Samo
    I can not resolve why error in simple creation of xts object xts(rep(0, NROW(TICK.NYSE)), order.by = index(TICK.NYSE)) Error in xts(rep(0, NROW(TICK.NYSE)), order.by = index(TICK.NYSE)) : order.by requires an appropriate time-based object appeared while this was working perfectly 14 days ago when I last used the same code (since then the only difference is that TICK.NYSE grow in length since data was added since then). More details below: > Sys.getenv("TZ") [1] "EST" > tail(xts(rep(0, NROW(TICK.NYSE)), order.by = index(TICK.NYSE))) Error in xts(rep(0, NROW(TICK.NYSE)), order.by = index(TICK.NYSE)) : order.by requires an appropriate time-based object > class(index(TICK.NYSE["T09:30/T09:31"])) [1] "POSIXct" > tail(xts(rep(0, NROW(tail(TICK.NYSE))), order.by = index(tail(TICK.NYSE)))) Error in xts(rep(0, NROW(tail(TICK.NYSE))), order.by = index(tail(TICK.NYSE))) : order.by requires an appropriate time-based object > tail(TICK.NYSE) TICK-NYSE.Open TICK-NYSE.High TICK-NYSE.Low TICK-NYSE.Close 2012-03-15 14:54:00 -278 -89 -299 -89 2012-03-15 14:55:00 -89 427 -89 201 2012-03-15 14:56:00 201 318 30 234 2012-03-15 14:57:00 234 242 -222 -64 2012-03-15 14:58:00 -64 346 -82 346 2012-03-15 14:59:00 346 525 36 525 TICK-NYSE.Volume TICK-NYSE.WAP TICK-NYSE.hasGaps 2012-03-15 14:54:00 0 0 0 2012-03-15 14:55:00 0 0 0 2012-03-15 14:56:00 0 0 0 2012-03-15 14:57:00 0 0 0 2012-03-15 14:58:00 0 0 0 2012-03-15 14:59:00 0 0 0 TICK-NYSE.Count 2012-03-15 14:54:00 31 2012-03-15 14:55:00 31 2012-03-15 14:56:00 31 2012-03-15 14:57:00 31 2012-03-15 14:58:00 29 2012-03-15 14:59:00 30 > str(TICK.NYSE) An ‘xts’ object from 2011-01-18 09:30:00 to 2012-03-15 14:59:00 containing: Data: num [1:114090, 1:8] -5 -144 24 -148 -184 -77 20 121 111 -60 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:8] "TICK-NYSE.Open" "TICK-NYSE.High" "TICK-NYSE.Low" "TICK-NYSE.Close" ... Indexed by objects of class: [POSIXct,POSIXt] TZ: xts Attributes: List of 4 $ from : chr "20110119 23:59:59" $ to : chr "20110124 23:59:59" $ src : chr "IB" $ updated: POSIXct[1:1], format: "2012-01-19 02:34:52" > str(index(TICK.NYSE)) Class 'POSIXct' atomic [1:114090] 1.3e+09 1.3e+09 1.3e+09 1.3e+09 1.3e+09 ... ..- attr(*, "tzone")= chr "" ..- attr(*, "tclass")= chr [1:2] "POSIXct" "POSIXt" > Sys.getenv("TZ") [1] "EST" > tail(index(TICK.NYSE)) [1] "2012-03-15 14:54:00 EST" "2012-03-15 14:55:00 EST" [3] "2012-03-15 14:56:00 EST" "2012-03-15 14:57:00 EST" [5] "2012-03-15 14:58:00 EST" "2012-03-15 14:59:00 EST" > head(index(TICK.NYSE)) [1] "2011-01-18 09:30:00 EST" "2011-01-18 09:31:00 EST" [3] "2011-01-18 09:32:00 EST" "2011-01-18 09:33:00 EST" [5] "2011-01-18 09:34:00 EST" "2011-01-18 09:35:00 EST" > Sys.info() sysname "Linux" release "3.0.0-16-generic" version "#28-Ubuntu SMP Fri Jan 27 17:44:39 UTC 2012" > sessionInfo() R version 2.14.1 (2011-12-22) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 [9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lattice_0.20-0 multicore_0.1-7 [3] doSNOW_1.0.5 snow_0.3-8 [5] doRedis_1.0.4 rredis_1.6.3 [7] foreach_1.3.2 codetools_0.2-8 [9] iterators_1.0.5 PerformanceAnalytics_1.0.3.3 [11] quantstrat_0.6.1 blotter_0.8.4 [13] twsInstrument_1.3-3 FinancialInstrument_0.10.6 [15] IBrokers_0.9-6 quantmod_0.3-18 [17] TTR_0.21-0 xts_0.8-4 [19] Defaults_1.1-1 strucchange_1.4-6 [21] sandwich_2.2-8 zoo_1.7-7 [23] rj_1.0.2-5 loaded via a namespace (and not attached): [1] grid_2.14.1 tools_2.14.1 > dput(tail(TICK.NYSE)) structure(c(-385, -213, -42, -334, -233, -111, -121, 20, -14, -125, -73, 265, -583, -269, -426, -520, -443, -440, -213, -42, -334, -233, -111, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 31, 30, 30, 31, 31), class = c("xts", "zoo" ), .indexCLASS = c("POSIXct", "POSIXt"), .indexTZ = "", from = "20110119 23:59:59", to = "20110124 23:59:59", src = "IB", updated = structure(1326958492.96405, class = c("POSIXct", "POSIXt")), index = structure(c(1331927640, 1331927700, 1331927760, 1331927820, 1331927880, 1331927940), tzone = "", tclass = c("POSIXct", "POSIXt")), .Dim = c(6L, 8L), .Dimnames = list(NULL, c("TICK-NYSE.Open", "TICK-NYSE.High", "TICK-NYSE.Low", "TICK-NYSE.Close", "TICK-NYSE.Volume", "TICK-NYSE.WAP", "TICK-NYSE.hasGaps", "TICK-NYSE.Count")))

    Read the article

  • WPF Dispatcher timer tick freezes my application

    - by Nebo
    I've got a little problem using WPF Dispatcher Timer. On each timer tick my application freezes for a moment (until timer tick method finishes). This is my code: private DispatcherTimer _Timer = new DispatcherTimer(); _Timer.Tick += new EventHandler(_DoLoop); _Timer.Interval = TimeSpan.FromMilliseconds(1500); _Timer.Start(); Is there any way to avoid this and have my application run smoothly?

    Read the article

  • Cache bandwidth per tick for modern CPUs

    - by osgx
    Hello What is a speed of cache accessing for modern CPUs? How many bytes can be read or written from memory every processor clock tick by Intel P4, Core2, Corei7, AMD? Please, answer with both theoretical (width of ld/sd unit with its throughput in uOPs/tick) and practical numbers (even memcpy speed tests, or STREAM benchmark), if any. PS it is question, related to maximal rate of load/store instructions in assembler. There can be theoretical rate of loading (all Instructions Per Tick are widest loads), but processor can give only part of such, a practical limit of loading.

    Read the article

  • Windows 8 Automatic Logon Tick Box Missing

    - by Luke Kenny
    Recently (in the past few days,) perhaps following the latest Windows Update, it appears the tick box to allow automatic logon in "control userpasswords2" or "netplwiz" has disappeared. I have two machines running Windows 8 and the option is no longer available for either. Both machines user a Microsoft account, rather than a local account, for the primary user to logon. The only other recent change I can think of, and I am confident this change was made well before this issue arose, was enabling HomeGroup. How can I re-enable automatic logon for the affected user?

    Read the article

  • form update too expensive to be executed in Winform.Timer.Tick

    - by Abruzzo Forte e Gentile
    Hi all I have a WinForm drawing a chart from available data. I programmed it so that every 1 secong the Winform.Timer.Tick event calls a function that: will dequeue all data available will add new points on the chart Right now data to be plotted is really huge and it takes a lot of time to be executed so to update my form. Also Winform.Timer.Tick relies on WM_TIMER , so it executes in the same thread of the Form. Theses 2 things are making my form very UNresponsive. What can I do to solve this issue? I thought the following: moving away from usage of Winform.Timer and start using a System.Threading.Timer use the IsInvokeRequired pattern so I will rely on the .NET ThreadPool. Since I have lots of data, is this a good idea? I have fear that at some point also the ThreadPool will be too long or too big. Can you give me your suggestion about my issue? Thank you very much! AFG

    Read the article

  • Any open source back test engine using bloomberg tick-by-tick data?

    - by Ian Xu
    I have a back test on index futures to do. I've finished the test on 1-minute OHLC data and the result is OK. Further I want to opt our tick-by-tick data downloaded from Bloomberg. I have browsed the internet and found that several trading platforms are available for such function but Bloomberg is not in the data source providers list. So I think these are not suitable for my case. I'm wondering whether there is any open-source engine that I may embed to finish the test?

    Read the article

  • Update PageTitle on Timer.Tick

    - by sohum
    I've got a page with a Timer that is being used as a trigger on an UpdatePanel. The page also contains a TabContainer and several TabPanels. Look at this question for more information. Basically, I've got an UpdatePanel as the element in each TabPanel's ContentTemplate, and the UpdatePanel is triggered by the Timer. My page displays data by reading a database on each tick. I've got the following code running on each Timer.Tick in my codebehind: protected void timeRefresher_Tick(object sender, EventArgs e) { UpdateLivePageTitle(); } The UpdateLivePageTitle() function reads the new information from the database and sets Page.Title accordingly. However, this information is of course not sent to the browser because there is no full page postback--only an async postback to the update panels. As a result, my page title is not being updated until the whole page is being posted back, which destroys the purpose of using UpdatePanels in the first place. I figure there would be a way to do this by using the document.title JS element and call that from within UpdateLivePageTitle(). But as of now, I haven't been able to figure out how to do this. I tried using the following in my UpdateLivePageTitle() function: string updatePageTitleScript = String.Format("document.title = '{0}'", newPageTitle); ToolkitScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "UpdatePageTitle", updatePageTitleScript, true); But the result of this was that my TabContainer stopped rendering. I'm also not sure that would work with the async partial page postbacks, either. Any ideas? Thanks!

    Read the article

  • scroll position for div on timer tick event

    - by MeqDotNet
    I have a chat box that refresh every 7 seconds by a timer the problem is that the div is scrolling top each time the timer I have tried to add the following Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "focus", "document.getElementById('divMessages').scrollTop = document.getElementById('divMessages').style.height;", true); to the timer tick but it doesn't work ticks here is my code <table border="0" cellpadding="0" cellspacing="0"> <tr> <td style="width: 500px;"> <div id="divMessages" style="background-color: White; border-color:Black;border-width:1px;border-style:solid;height:300px;width:592px;overflow-y:scroll; font-size: 11px; padding: 4px 4px 4px 4px;" onload="SetScrollPosition();" onresize="SetScrollPosition()"> <asp:Literal Id="litMessages" runat="server" /> </div> </td> <td>&nbsp;</td> <td> <div id="divUsers" style="background-color: White; border-color:Black;border-width:1px;border-style:solid;height:300px;width:150px;overflow-y:scroll; font-size: 11px; padding: 4px 4px 4px 4px;"> <asp:Literal Id="litUsers" runat="server" /> </div> </td> </tr> <tr> <td colspan="3"> <asp:TextBox Id="txtMessage" onkeyup="ReplaceChars()" onfocus="SetToEnd(this)" runat="server" MaxLength="100" Width="500px" /> <asp:Button Id="btnSend" runat="server" Text="Send" OnClientClick="SetScrollPosition()" OnClick="BtnSend_Click" /> &nbsp; <b>Color:</b> <asp:DropDownList Id="ddlColor" runat="server"> <asp:ListItem Value="Black" Selected="true">Black</asp:ListItem> <asp:ListItem Value="Blue">Blue</asp:ListItem> <asp:ListItem Value="Navy">Navy</asp:ListItem> <asp:ListItem Value="Red">Red</asp:ListItem> <asp:ListItem Value="Orange">Orange</asp:ListItem> <asp:ListItem Value="#666666">Gray</asp:ListItem> <asp:ListItem Value="Green">Green</asp:ListItem> <asp:ListItem Value="#FF00FF">Pink</asp:ListItem> </asp:DropDownList> &nbsp; <asp:Button Id="btnLogOut" Text="Log Out" runat="server" OnClick="BtnLogOut_Click" /> </td> </tr> </table> <script type="text/javascript"> var div = document.getElementById('divMessages'); div.scrollTop = div.style.height; </script> </ContentTemplate> </asp:UpdatePanel>

    Read the article

  • iPhone Datepicker plays 'tick' sound

    - by DecodingSand
    Hey guys, Does any of you know what event I can tap into on the DatePicker when the wheel moves. I want to play a sound (got sound code) as the wheel spin. Just like the timer set picker in Apple's clock app. All that is there is a single event for ValueChanges which only fires once, at the end of a wheel spin. Thanks in advance

    Read the article

  • How does DateTime.Now.Tick exactly work?

    - by Roflcoptr
    In my application I generate files at random opportunities. To ensure a unique naming, I tried to use the nano seconds since 1.1.1970: long time = DateTime.Now.Ticks; String fileName = Convert.ToString(time); Console.WriteLine(fileName); Now I observed something weird. Why is the output like that? I mean why are the last 4 numbers always the same? I can use this as a filename, that is not the problem, but I'm just wondering about it. 634292263478068039 634292263512888039 634292263541368039 634292263603448039 634292263680078039

    Read the article

  • Getting the System tick count with basic C++?

    - by Donal Rafferty
    I essentially want to reconstruct the getTickCount() windows function so I can use it in basic C++ without any non standard libraries or even the STL. (So it complies with the libraries supplied with the Android NDK) I have looked at clock() localtime time But I'm still unsure whether it is possible to replicate the getTickCount windows function with the time library. Can anyone point me in the right direction as to how to do this or even if its possible?

    Read the article

  • PHP using Declare ? What is a tick?

    - by ArneRie
    Iam a little bit confused by php function declare. What exactly is an single tick, i thought 1 tick = one line of code? But if i use: function myfunc() { print "Tick"; } register_tick_function("myfunc"); declare(ticks=1) { echo 'foo!bar'; } The script prints : "Tick" 2 Times??

    Read the article

  • how to keep display tick rate steady when using continuous collision detection?

    - by nas Ns
    (I've just found about this forum). I hope it is ok to repost my question again here. I posted this question at stackoverflow, but it looks like I might get better help here. Here is the question: I've implemented basic particles motion simulation with continuous collision detection. But there is small issue in display. Assume simple case of circles moving inside square. All elastic collisions. no firction. All motion is constant speed. No forces are involved, no gravity. So when a particle is moving, it is always moving at constant speed (in between collisions) What I do now is this: Let the simulation time step be 1 second (for example). This is the time step simulation is advanced before displaying the new state (unless there is a collision sooner than this). At start of each time step, time for the next collision between any particles or a particle with a wall is determined. Call this the TOC time; let’s say TOC was .5 seconds in this case. Since TOC is smaller than the standard time step, then the system is moved by TOC and the new system is displayed so that the new display shows any collisions as just taking place (say 2 circles just touched each other’s, or a circle just touched a wall) Next, the collision(s) are resolved (i.e. speeds updated, changed directions etc..). A new step is started. The same thing happens. Now assume there is no collision detected within the next 1 second (those 2 circles above will not be in collision any more, even though they are still touching, due to their speeds showing they are moving apart now), Hence, simulation time is advanced now by the full one second, the standard time step, and particles are moved on the screen using 1 second simulation time and new display is shown. You see what has just happened: One frame ran for .5 seconds, but the next frame runs for 1 second, may be the 3rd frame is displayed after 2 seconds, may be the 4th frame is displayed after 2.8 seconds (because TOC was .8 seconds then) and so on. What happens is that the motion of a particle on the screen appears to speed up or slow down, even though it is moving at constant speed and was not even involved in a collision. i.e. Looking at one particle on its own, I see it suddenly speeding up or slowing down, becuase another particle had hit a wall. This is because the display tick is not uniform. i.e. the frame rate update is changing, giving the false illusion that a particle is moving at non-constant speed while in fact it is moving at constant speed. The motion on the screen is not smooth, since the screen is not updating at constant rate. I am not able to figure how to fix this. If I want to show 2 particles at the moment of the collision, I must draw the screen at different times. Drawing the screen always at the same tick interval, results in seeing 2 particles before the collision, and then after the collision, and not just when they colliding, which looked bad when I tried it. So, how do real games handle this issue? How to display things in order to show collisions when it happen, yet keep the display tick constant? These 2 requirements seem to contradict each other’s.

    Read the article

  • How to get timestamp of tick precision in .NET / C#?

    - by Hermann
    Up until now I used DateTime.Now for getting timestamps, but I noticed that if you print DateTime.Now in a loop you will see that it increments in descrete jumps of approx. 15 ms. But for certain scenarios in my application I need to get the most accurate timestamp possible, preferably with tick (=100 ns) precision. Any ideas? Update: Apparently, StopWatch / QueryPerformanceCounter is the way to go, but it can only be used to measure time, so I was thinking about calling DateTime.Now when the application starts up and then just have StopWatch run and then just add the elapsed time from StopWatch to the initial value returned from DateTime.Now. At least that should give me accurate relative timestamps, right? What do you think about that (hack)? NOTE: StopWatch.ElapsedTicks is different from StopWatch.Elapsed.Ticks! I used the former assuming 1 tick = 100 ns, but in this case 1 tick = 1 / StopWatch.Frequency. So to get ticks equivalent to DateTime use StopWatch.Elapsed.Ticks. I just learned this the hard way. NOTE 2: Using the StopWatch approach, I noticed it gets out of sync with the real time. After about 10 hours, it was ahead by 5 seconds. So I guess one would have to resync it every X or so where X could be 1 hour, 30 min, 15 min, etc. I am not sure what the optimal timespan for resyncing would be since every resync will change the offset which can be up to 20 ms.

    Read the article

  • Does kern.hz still have any relevance in FreeBSD if "dynamic tick mode" is enabled?

    - by Frerich Raabe
    I'm running a FreeBSD 9.0 setup as a virtual machine in a KVM setup. In previous versions of FreeBSD it was common to force the kern.hz setting to a lower value so that the virtual machine does not keep the host busy because it's handling timer interrupts without having any work to do - the FreeBSD Handbook explains: The most important step is to reduce the kern.hz tunable to reduce the CPU utilization of FreeBSD under the Parallels environment. This is accomplished by adding the following line to /boot/loader.conf: kern.hz=100 Without this setting, an idle FreeBSD Parallels guest OS will use roughly 15% of the CPU of a single processor iMac®. After this change the usage will be closer to a mere 5%. However, in FreeBSD 9, the "dynamic tick mode" (aka "tickless mode") is the default, controlled by the kern.eventtimer.periodic setting which defaults to 0 (read: tickless mode). This makes me wonder - does the tip of lowering kern.hz still have any relevance for making FreeBSD 9 play nicely in a virtual machine setup?

    Read the article

  • Why looping in Delphi faster than C#?

    - by isa
    Delphi: procedure TForm1.Button1Click(Sender: TObject); var I,Tick:Integer; begin Tick := GetTickCount(); for I := 0 to 1000000000 do begin end; Button1.Caption := IntToStr(GetTickCount()-Tick)+' ms'; end; C#: private void button1_Click(object sender, EventArgs e) { int tick = System.Environment.TickCount; for (int i = 0; i < 1000000000; ++i) { } tick = System.Environment.TickCount - tick; button1.Text = tick.ToString()+" ms"; } Delphi gives around 515 ms C# gives around 3775 ms

    Read the article

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