Search Results

Search found 59278 results on 2372 pages for 'time estimation'.

Page 120/2372 | < Previous Page | 116 117 118 119 120 121 122 123 124 125 126 127  | Next Page >

  • How to calculate a operation's time in micro second precision

    - by Sanjeet Daga
    I want to calculate performance of a function in micro second precision on Windows platform. Now Windows itself has milisecond granuality, so how can I achieve this. I tried following sample, but not getting correct results. LARGE_INTEGER ticksPerSecond = {0}; LARGE_INTEGER tick_1 = {0}; LARGE_INTEGER tick_2 = {0}; double uSec = 1000000; // Get the frequency QueryPerformanceFrequency(&ticksPerSecond); //Calculate per uSec freq double uFreq = ticksPerSecond.QuadPart/uSec; // Get counter b4 start of op QueryPerformanceCounter(&tick_1); // The ope itself Sleep(10); // Get counter after opfinished QueryPerformanceCounter(&tick_2); // And now the op time in uSec double diff = (tick_2.QuadPart/uFreq) - (tick_1.QuadPart/uFreq);

    Read the article

  • COMET chat application - IIS7 slows down over time

    - by Yaron
    I have built a chat application which uses this code to push messages to clients (web pages) and to monitor online users and their information. Basically, the code creates and manages a custom thread pool for maintaining the list of connected users & their state. The application was hosted on a shared hosting account (IIS6), and worked fine. After moving the site (ASP.Net App) to a dedicated virtual server it seems I have a problem where IIS7 gets slower and slower as time passes, and my only "solution" is to restart IIS. I am trying to look at the performance counters and have do idea on which one to look.

    Read the article

  • Set both Text and Value property of ComboBox in design time

    - by The King
    I need to add the following items to a combo box. Value DisplayText Mpost Posted Call Calling RScan Re-Scan These items are fairly static, and is not retrieved from any database... Hence thought of assigning these in design time itself. I'm Unable to use Items property as it asks only one value per item... Could you please help. Ps : In case you are suggesting BindingSource, could you please give me an example. I was not able to find one.

    Read the article

  • Measuring CPU time per-thread on Windows

    - by Eli Courtwright
    I'm developing a long-running multi-threaded Python application for Windows, and I want the process to know the CPU time that each of its threads has taken. I can get the overall times for the entire process with os.times() but I need to know the per-thread times. I know that there are external tools such as the Sysinternals Process Explorer, but my program itself needs to have this information. If I were on Linux, I look in the /proc filesystem, as described here. If I were writing C code, I'd use the GetThreadTimes call, as described here. So how can I accomplish this on Windows using Python?

    Read the article

  • Wrong image dimensions when it's dynamically loaded on a page the 1st time

    - by Nikita Barsukov
    I have the following piece of Javascript code on my web-page var central_image = document.createElement("img") central_image.setAttribute("src", imgs[curr_image_no - 1]); central_image.setAttribute("name", "jpeg"); document.getElementById("photo").appendChild(central_image); central_image.onload = getDimensions(); //function that alerts image dimensions Now, when the central_image is loaded for the 1st time in Firefox, its height always equals to 0. In IE its dimensions are 28 x 30 pixels. When I reload image, its dimensions are OK in both browsers. I guess the problem is that function getDimensions() starts before image was loaded completely. How to change that?

    Read the article

  • Getting Different IP each time

    - by Sarfraz
    Hello, I am creating a poll script for a facebook fan page: http://www.facebook.com/apps/application.php?id=115400635147687&v=app_115400635147687 I am getting the IP using: $_SERVER['REMOTE_ADDR'] But the problem is that each time I refresh the page, or make an ajax call, the IP is changed everytime. Someone told me that facebook has many IPs, proxies. Basically I need to save the IP in database, so that once a user from certain IP has voted, he should not be able to do so again. What is the solution or alternative to this?

    Read the article

  • XmlSerializer.Deserialize method appends timezone to a time and datetime field

    - by G33kKahuna
    Have a small script in Microsoft.NET 2.0 that deserializes a XML back to a typed object, connects dyanimcally to a web service using ServiceDescription and binds the deserialized typed object to the WebMethod inbound. The XML prior to serialization looks like below <completion_time>12:19:38</completion_time> on the wire when communicating to the web service looks like below <completion_time>12:19:38.0000000-04:00</completion_time> with the timezone appended to the end. This is causing the time to be read differently when communicating to a web service at a different timezone. is there anyway to let XmlSerializer skip the timezone? Or any other known workarounds?

    Read the article

  • Jelly bean not calling onPrepareOptionsMenu() when opening the menu for the first time

    - by syloc
    I'm overriding onPrepareOptionsMenu to hide and show menu items. When testing it with the API level 16 emulator; onPrepareOptionsMenu is not called when opening the menu for the first time. But when i reopen the menu it works. The problem is only with the first usage. You can simple test it with this; @Override public void onPrepareOptionsMenu(Menu menu) { Toast.makeText(this.getActivity(), "pre", Toast.LENGTH_SHORT).show(); super.onPrepareOptionsMenu(menu); } Any ideas?

    Read the article

  • ASP.net repeater, scroll 3 at a time

    - by Christo Fur
    I have a list of data that I need to display in a web page 3 at a time The first needs to be displayed in a div called "left" , the second in a div called "centre" and the third in a div called "right". And I need to be able to scroll through the data with a pager. And so the next 3 results will be displayed in a similar way, and so on till the end of the data set Obviously the alternating templates in the repeater are not suitable for this. Is there a smarter way to achieve this?

    Read the article

  • Calculating intraday candlesticks by time intervals

    - by Sam
    This maybe an over asked question, but my mind draws blank at this moment. I know what a candlestick chart is and how to draw it daily. But how to draw it intraday at asked time periods. I have this server, written in Java, that gives me trade depth (each trade done since the start of the day). Its just a stream of raw data: price, shares, timestamp. How does one go about calculating candlestick data from that? Lets say, they want to have 5 min candlestick or 1min candlestick. Or is there a library that will do that for me if I feed it data? Any help is appreciated!

    Read the article

  • NSDateFormatter dateFromString for 24hr date gives wrong time

    - by krusty
    I want to add event to native calender.I am having problem in getting date accurate time from string. I have set locale,24 hr format. but still getting the same bug. EKEvent *event = [EKEvent eventWithEventStore:self.eventStore]; event.title=txtTitle.text; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; NSLocale *locale =[[[NSLocalealloc]initWithLocaleIdentifier:@"en_US_POSIX"]autorelease]; [dateFormatter setLocale:locale]; [dateFormatter setDateFormat:@"dd/MM/yyyy HH:mm"]; event.startDate=[dateFormatter dateFromString:lblStartDate.text]; My lblStartDate.text is:-10/02/2011 12:12 PM And event.startDate is getting set as:-2011-02-10 06:42:00 GMT Can anyone help???

    Read the article

  • Android: chronometer widget and layout() method could not work well at the same time

    - by Lennard
    I write a test android app, in which there are only two views, a chronometer and a imageview. Using the layout() method of the imageview to dynamically change the position of it, I wish to implement drag-and-drop effect. It does work. However, each time the chronometer ticks, the imageview is always reverted to its original position, which seems that the whole screen is reloaded from the layout xml. So, does anybody know how to prevent the imageview from reverting to the original place, and let chronometer and drag-and-drop effect coexist? Thx

    Read the article

  • File modified date/time changes when uploaded via FTP

    - by Nate Shoffner
    Hey /g/, FTP/PHP question here. On one of my pages I load .txt files from a directory. Pretty simple. I also display the modified date of the text file using this: date('m/d/Y', filemtime($file)); This works fine on my WAMP server but when I upload the files via FTP, the modified date is changed to when they were uploaded. I'm currently hosting on a free hosting provider (freehostia to be exact). Is there any way to keep the modified date/time from changing when it's uploaded? Or is there perhaps an alternative way to go about this? Any ideas are appreciated.

    Read the article

  • Fire only one Custom Validator at a time

    - by Lijo
    I have two Custom Validators attached to a textbox. The textbox is to enter comma separated list of emails. The first validator checks that there is not duplicate email address. The second custom validator checks that all the email addresses are in valid format. I have following code and it works fine. However, when both the failure criteria is met both of them are firing and I get two * at the right side of my textbox. What is the best approach to show only one * at a time? CODE <asp:CustomValidator ID="valEmailRecipients" runat="server" ControlToValidate="txtEmailRecipients" ClientValidationFunction="isUniqueElements" OnServerValidate="IsUniqueEmail_Validate" Text="*" ErrorMessage="There should be no duplicate email address for a report" ValidationGroup="Save"> </asp:CustomValidator> <asp:CustomValidator ID="valEmailFormat" runat="server" ControlToValidate="txtEmailRecipients" ClientValidationFunction="checkEmailFormat" OnServerValidate="IsValidEmailFormat_Validate" Text="*" ErrorMessage="Entries should be valid email addresses separated by comma" ValidationGroup="Save"> </asp:CustomValidator> REFERENCES: Validating with a Custom Function for ASP.NET Server Controls

    Read the article

  • How to discard time intervals with Time Series / XYPlots using JFreeChart?

    - by Alex Arnon
    Hi All, I am building a set of chart displays, one of which is for a month display of daily trading - that is, one point of data per day (closing). Since there is no trade during weekends and holidays, I need to discard these data points. Not only that, but data points should still appear adjacent to each other, regardless of any gaps in time. This can be seen in any such chart e.g. in the 3 month graph for Nasdaq on Yahoo Finance - see how weekends are skipped. My question is: how should one correctly implement this in JFreeChart? Thanks in advance!

    Read the article

  • displaying the infoWindow in Google maps at the same time as the marker

    - by Decbrad
    Hi all, I have developed a Google Map page which displays a marker where i tell it to. If you click the market the infoWindow pops up. However, I was wondering if anybody knows how to open the infowindow and display the marker at the same time? (as in onload) here's the page... http://www.sportingemporium.com/map_test3.htm This seems like a straight forward exercise but I have searched for hours without finding a solution! Any assistance would be great! thanks in advance Decbrad

    Read the article

  • Why does my Eclipse crash all the time?

    - by Marcel
    Somehow stupid question, I have to admit - hope it won't cost me too many points. To make it clear: I would also be happy if you can help me find the reason for the crashes. I wouldn't expect a precise answer. However, I don't see why my Eclipse is crashing (freezing) all the time. Mostly when I save a file. For some reason, crashes seem to increase lately... I use Eclipse Helios (Version: 3.6.1) and java version "1.6.0_20" (OpenJDK Runtime Environment (IcedTea6 1.9.2) (6b20-1.9.2-0ubuntu2) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)) on Ubuntu 10.10 (64-Bit). Thank you!

    Read the article

  • I'm asked to tune a long starting app into a short time period

    - by Jason
    Hi, I'm asked to shorten the startup period of a long starting app, however I have also to obligate to my managers to the amount of time i will reduce the startup - something like 10-20 seconds. As i'm new in my company I said I can obligate with timeframe of months (its a big server and I'm new and i plan to do lazy load + performance tuning). that answer was not accepted I was required to do some kind of a cache to hold important data in another server and then when my server starts up it would reach all its data from that cache - I find it a kind of a workaround and i don't really like it. do you like it? what do you think I should do? any suggestions? PS when i profiled the app i saw many small issues that make the startup long (like 2 minutes) it would not be a short process to fix all and to make lazy load. Any kind of suggestions would help. language - java. Thanks

    Read the article

  • How do I get Java to parse and format a date/time with the same time zone? I keep getting the local timezone

    - by fishtoprecords
    My application keeps all Java Date's in UTC. Parsing them is easy, but when I print them out, the display shows the computer's local time zone, and I want to show it as UTC. Example code: String sample = "271210 200157 UTC"; SimpleDateFormat dfmt = new SimpleDateFormat("ddMMyy HHmmss Z"); Date result = dfmt.parse(sample); System.out.printf("%tc\n", result); the result is Mon Dec 27 15:01:57 EST 2010 What I want is Mon Dec 27 20:01:57 UTC 2010 Clearly I have to set some Locale and TimeZone values, but I don't see where to put them. Thanks Pat

    Read the article

  • Just in time debugger is popping up when debugging service client

    - by MAHESH K .M
    I have created as WCF service and hosted in IIS . This service is calling from another web application. When I am trying to debug the service calling event in the web application, the Just-in-Time debugger is popping up. It is running fine in the normal mode. Only in the debug mode the service is not running and JIT debugger is popping up also Why it happens? How to debug the service call in this scenario? The service is in .NET 4 and the web application is in .net 1.1 Thanks in advance Mahesh.

    Read the article

  • vba excel: do something every time a certain variable is changed

    - by every_answer_gets_a_point
    im doing a bunch of stuff to the variable St For i = 1 To 30000 Randomize e1 = Rnd e2 = Rnd z1 = Sqr(-2 * Log(e1)) * Cos(2 * 3.14 * e2) z2 = Sqr(-2 * Log(e1)) * Sin(2 * 3.14 * e2) St = So * Exp((r - (sigma ^ 2) / 2) * T + sigma * Sqr(T) * z1) C = C + Application.WorksheetFunction.Max(St - K, 0) St = So * Exp((r - (sigma ^ 2) / 2) * T - sigma * Sqr(T) * z1) C = C + Application.WorksheetFunction.Max(St - K, 0) St = So * Exp((r - (sigma ^ 2) / 2) * T + sigma * Sqr(T) * z2) C = C + Application.WorksheetFunction.Max(St - K, 0) St = So * Exp((r - (sigma ^ 2) / 2) * T - sigma * Sqr(T) * z2) C = C + Application.WorksheetFunction.Max(St - K, 0) Next i how do i get notified every time the variable changes?

    Read the article

  • Measuring time taken to display an object in Flex

    - by dta
    For e.g. function showIt():void { something.visible = true; } function init():void { time1 = flash.utils.getTimer(); showIt(); time2 = flash.utils.getTimer(); } <mx:st id="something" visible="false"/> <mx:Button click="init()"/> In the above code, I want to measure the time taken to display st on screen. Is it enough to compute time2 - time1? Or should I put an event handler on render? Or some other way?

    Read the article

  • "lock request time out period exceeded" Error When Trying to See DB Hierarchies

    - by Lloyd Banks
    I have a DB that I can run basic queries (albeit much slower than normal) off of. When I try to see the hierarchy trees for tables, views, or procedures in SSMS Object Explorer, I get the "lock request time out period exceeded". My Report Server reports that run off of objects in this DB are no longer completing. Jobs associated with procedures stored on this DB also do not run. I tried using sp_who2 to find and kill all connections on the DB. This has not solved the problem. What is going on here? How can I resolve this?

    Read the article

  • Unable to convert MySQL date/time value to System.DateTime

    - by Sri Kumar
    Hello I am using ibatis and C#. i get a result from a select query that has CreatedDate as one of the field. The Datatype of CreatedDate in Mysql is Date. I assign the result set of the select query to a Ilist< DeliveryClass **. Here the DeliveryClass CreatedDate as DateTime. When i run the application, i get **Unable to convert MySQL date/time value to System.DateTime. What could be the problem?

    Read the article

  • ncurses - expect: sleep executes at wrong time

    - by rahul
    I have some ncurses apps that I need to automate to test repeatedly. I am placing the "sleep" command between "send" commands. However, what i see is that all the sleep's are executed in the beginning before the screen loads. expect concatenates the sends (I see that at the screen bottom during sleep) then issues them together. I have tried sending all keys with "send -s" or "send -h". That marginally helps. I've replaced "-f" on line 1 with "-b" - again a tiny difference. Why isn't "sleep" pausing at the right time. Incidentally, my programs have a getc() loop, so i can't use "expect" command. I tried that too. #!/usr/bin/expect -f spawn ruby testsplit.rb #expect set send_human {3 3 5 5 7} set send_slow {10 1} exp_send -s -- "--" exec sleep 3 send -s "+" send -s "=" sleep 1 send -h -- "-" send -h -- "-" sleep 1 send -h -- "v" interact

    Read the article

< Previous Page | 116 117 118 119 120 121 122 123 124 125 126 127  | Next Page >