Search Results

Search found 59959 results on 2399 pages for 'time complexity'.

Page 17/2399 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • How to get the running of time of my program with gettimeofday()

    - by Mechko
    So I get the time at the beginning of the code, run it, and then get the time. struct timeval begin, end; gettimeofday(&begin, NULL); //code to time gettimeofday(&end, NULL); //get the total number of ms that the code took: unsigned int t = end.tv_usec - begin.tv_usec; Now I want to print it out in the form "**code took 0.007 seconds to run" or something similar. So two problems: 1) t seems to contain a value of the order 6000, and I KNOW the code didn't take 6 seconds to run. 2) How can I convert t to a double, given that it's an unsigned int? Or is there an easier way to print the output the way I wanted to?

    Read the article

  • Displaying current time above the thumb of a slider in Silverlight

    - by Scharrels
    I've made a time slider in Silverlight. To style it, I've made a control template and modified the style. I've added a text field above the thumb (always centered above the thumb), which should display the time. However, I can't find any way to access the slider information (e.g. current value) or find another way to pass any information to the style, which I can then data bind to the text field. So my question in short: how can I display time information above the thumb?

    Read the article

  • Real time video stream from camera via server to Iphone

    - by devdevdev
    Hi I want to create an Iphone app that can display real time video from a camera. The intended setup is. Camera connected to Mac Mini delivering real time video to Iphone over local network. The Iphone doesn't need to display high quality or use a high frame rate, but it has to be real time. Max 1 sec delay. I've been searching a lot for a solution, but so far I have not found a resonable one. HTTP Live Stream is not a solution due to the delay. Any suggestions?

    Read the article

  • SQL Time(2) to Array in C#?

    - by Jacob Huggart
    Hello all, I am using ASP MVC and SQL Server and I have a database that is updated intermittently with expected wait times for some event. Also, I am using some ajax and jquery. I need to display the average and maximum wait times. How can I take the entire list of time from the server and get the average time? Also, what would be the best method to simply grab a new time from the server when it is updated without having to pull the whole list again? Thanks!

    Read the article

  • Display relative time in hour, day, month and year

    - by JohnJohnGa
    I wrote a function toBeautyString(epoch) : String which given a epoch, return a string which will display the relative time from now in hour and minute For instance: // epoch: 1346140800 -> Tue, 28 Aug 2012 05:00:00 GMT // and now: 1346313600 -> Thu, 30 Aug 2012 08:00:00 GMT toBeautyString(1346140800) -> "2 days and 3 hours ago" I want now to extend this function to month and year, so it will be able to print: 2 years, 1 month, 3 days and 1 hour ago Only with epoch without any external libraries. The purpose of this function is to give to the user a better way to visualize the time in the past. I found this: Calculating relative time but the granularity is not enough.

    Read the article

  • Live asynchronous time feed for websites

    - by Maven
    I want to show up the time over my website based over the location of the user, let’s say if user one browsing the website is from USA than the time should be what is in USA currently and same for China etc. and all. I was wondering if there exists a JavaScript plugin for it but I didn’t find any as dynamic as I want, my requirements include: Something that can be fully stylized according to website theme (no iframes) The pattern I want is to be in (HH:MM:SS) It should be asynchronous like the second [SS] keep ticking and the time keep updating Is this possible, a way around to achieve it?

    Read the article

  • Slow server response time - CakePHP

    - by Hasan
    I am using CakePHP 1.2 for building a website. The problem i am facing is when ever a page loads it takes a lot of time in "waiting for www.example.com". The server response time is very slow. First i thot it was my database queries, but they were executing in less than seconds time. Next i also contacted the server people. They told it was not the server. Now i am stuck very badly with "waiting for www.example.com". Is the problem is in coding or the cakePHP is mis configured. Need help badly and fast. Thanks

    Read the article

  • Printing factorial at compile time in C++

    - by user519882
    template<unsigned int n> struct Factorial { enum { value = n * Factorial<n-1>::value}; }; template<> struct Factorial<0> { enum {value = 1}; }; int main() { std::cout << Factorial<5>::value; std::cout << Factorial<10>::value; } above program computes factorial value during compile time. I want to print factorial value at compile time rather than at runtime using cout. How can we achive printing the factorial value at compile time? I am using VS2009. Thanks!

    Read the article

  • PHP: producing relative date/time from timestamps

    - by KeyStroke
    Hi, I'm basically trying to convert a Unix timestamp (the time() function) to a relative date/time that's both compatible with past and future date. So outputs could be: 2 weeks ago 1 hour and 60 minutes ago 15 minutes and 54 seconds ago after 10 minutes and 15 seconds First I tried to code this, but made a huge unmaintainable function, and then I searched the internet for a couple of hours, yet all I can find are scripts that produce only one part of the time (e.h: "1 hour ago" without the minutes). Do you have a script that already does this? If so, I'd really appreciate if you could share it. Thanks.

    Read the article

  • How to calculate time spent for Linux system administration?

    - by Jaakko
    I would love figuring out how much time I actually have spent in shell performing administrative duties. For billing of course, this information is not sufficient, but it would be helpful to figure out how much time I have actually spent in shell. My question is: How anyone got tips on how to calculate time spent in shell (in hours + minutes), let's say per user account? Could anyone recommend a software that could be used to analyze this time? Optionally I would like to know about ways how to categorise time spent (e.g. 1 hour for Apache, 2 hours for Samba, etc.) Also, your takes on how you monitor your admin time, are also much appreciated! To narrow down the problem, I am specifically interested in ways of tracking time spent in shell for Linux system administration

    Read the article

  • create jrxml file at run time and modify at run time

    - by Srinivas
    Hi I have a requirement to develop custom reports where we already have some reoprts developed using JasperReports using iReport tool. Now the requirement is to modify those reports design at run time. I should use those existing jrxml files and save as to new report then change the design at run time. Also I should see those newly created reports whenever I want. I have gone through the Jasper API and Dynamic Reports where we can create the reports dynamically at run time but we can't save the design (like JRXML). I am looking for any other JRXML design API to create and modify and save the Jasper Reports at run time. I appreciate if any one can help me. Thanks in Advance Srinivas

    Read the article

  • Managing timezone in php with ics date/time format

    - by John
    Ok, I'm using an ICS parser utility to parse google calendar ICS files. It works great, except google is feeding me the times of the events at UCT.. so I need to subtract 5 hours now, and 6 hours when daylight savings happens. To get the start time I'm using: $timestart = date("g:iA",strtotime(substr($event['DTSTART'], 9, -3))); //$event['DTSTART'] feeds me back the date in ICS format: 20100406T200000Z So any suggestions how to handle timezone and daylight savings time? Thanks in advance

    Read the article

  • create jrml file at run time and modify at run time

    - by Srinivas
    Hi I have a requirement to develop custom reports where we already have some reoprts developed using JasperReports using iReport tool. Now the requirement is to modify those reports design at run time. I should use those existing jrxml files and save as to new report then change the design at run time. Also I should see those newly created reports whenever I want. I have gone through the Jasper API and Dynamic Reports where we can create the reports dynamically at run time but we can't save the design (like JRXML). I am looking for any other JRXML design API to create and modify and save the Jasper Reports at run time. I appreciate if any one can help me. Thanks in Advance Srinivas

    Read the article

  • jquery time delay

    - by msaif
    i used this script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" script $(document).ready(function() { $( "#navigation" ).accordion( "option", "active", -1 ); }); script i am developing accordin but i need to set time for accordin. how can i set time for opeing and closing in according?

    Read the article

  • Best commandline time tracking application?

    - by Jared
    I'm looking for something that runs in a terminal and allows me to track time. I'd like it to be open source but that isn't necessary. Most time tracking apps I've found are either web or gui based and there for take longer to enter data then I'd like.

    Read the article

  • Time series in R

    - by Christian Stade-Schuldt
    Hi, I am tracking my body weight in a spread sheet but I want to improve the experience by using R. I was trying to find some information about time series analysis in R but I was not succesful. The data I have here is in the following format: date - weight - body-fat-percentage - water-percentage e.g. 10/08/09 - 84.30 - 18.20 - 55.3 What I want to do plot weight and exponential moving average against time How can I achieve that?

    Read the article

  • Dealing with PHP server and MySQL server in different time zones

    - by Kyle Noland
    For those of us who use standard shared hosting packages, such as GoDaddy or Network Solutions, how do you handle datetime conversions when your hosting server (PHP) and MySQL server are in different time zones? Also, does anybody have some best practice advice for determining what time zone a visitor to your site is in and manipulating a datetime variable appropriately?

    Read the article

  • grep + add time out after some time if not find the relevant match

    - by yael
    Dear friends I use the following command syntax to search params in my script grep -qsRw -m1 "any_param" /dir/..../ Some times the search take avery long time The question is how to add time out to grep command For example after 20 seconds grep will break out If it not illegal to add time out to grep , how it will possible on other way? THX Yael

    Read the article

  • Real Time LaTeX?

    - by shoosh
    I'm looking for an application in which I can write pure LaTeX in one half of the screen and on the other half to see the compiled document in real time. This seems really like an obvious way to do LaTeX authoring but it doesn't look like any software is able to do it. LyX is not what I'm looking for. I want to edit the actual LaTeX and see it rendered in real time. Why isn't this already being done somewhere?

    Read the article

  • Python run command line (time)

    - by pns
    Hi, I want to run the 'time' unix command from a Python script, to time the execution of a non Python app. I would use the os.system method. Is there any way to save the output of this in Python? My goal is to run the app several times, save their execution times and then do some statistics on them. Thank You

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >