Search Results

Search found 2773 results on 111 pages for 'calculate'.

Page 7/111 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Algorithm to calculate the number of divisors of a given number

    - by sker
    What would be the most optimal algorithm (performance-wise) to calculate the number of divisors of a given number? It'll be great if you could provide pseudocode or a link to some example. EDIT: All the answers have been very helpful, thank you. I'm implementing the Sieve of Atkin and then I'm going to use something similar to what Jonathan Leffler indicated. The link posted by Justin Bozonier has further information on what I wanted.

    Read the article

  • How to calculate next Friday at 3am?

    - by Mark
    How can you calculate the following Friday at 3am as a datetime object? Clarification: i.e., the calculated date should always be greater than 7 days away, and less than or equal to 14. Going with a slightly modified version of Mark's solution: def next_weekday(dt=datetime.datetime.now(), time_of_day=datetime.time(hour=3), day_of_week=4): dt += datetime.timedelta(days=7) if dt.time() < time_of_day: dt = dt.combine(dt.date(), time_of_day) else: dt = dt.combine(dt.date(), time_of_day) + datetime.timedelta(days=1) return dt + datetime.timedelta((day_of_week - dt.weekday()) % 7)

    Read the article

  • Big O, how do you calculate/approximate it?

    - by Sven
    Most people with a degree in CS will certainly know what Big O stands for. It helps us to measure how (in)efficient an algorithm really is and if you know in what category the problem you are trying to solve lays in you can figure out if it is still possible to squeeze out that little extra performance.* But I'm curious, how do you calculate or approximate the complexity of your algorithms? *: but as they say, don't overdo it, premature optimization is the root of all evil, and optimization without a justified cause should deserve that name as well.

    Read the article

  • How to calculate an IPv6 IP Number?

    - by Bram
    I'm adding GeoIP tracking to WCF Web Service using MaxMinds' GeoIP Lite Country. All works well for their IPv4 database but they don't give any samples to calculate an IPv6 IP Number. I've contacted them and they said to use a search engine. Anyone have a sample they're willing to share? Any language will do.

    Read the article

  • Dynamically calculate frequency value.

    - by MS Nathan
    Hi, In my app, I want to find/calculate the audio frequency as dynamically when i am recording an audio and no need to save, play and all. Now i am trying to do that with help of an aurioToch sample code. In that sample, inside FFTBufferManager class methods such as GrabAudioData and ComputeFFT,Here I am not able to find where they are calculating frequency value as dynamically depends on the audio sound and I spent more than 5 days.please help me.

    Read the article

  • Calculate broadcast address given IP address and subnet in PowerShell

    - by halr9000
    My goal is to calculate the broadcast address when given the IP and subnet mask of a host node. I know, sounds like homework. Once I reasoned through my task and boiled it down to this, I was amused with myself. Anyway, the solution will look something like the one in this question I suppose, but I'm not a math major and my C sucks. I could do with a PowerShell (preferred) or C# example to get me going. thanks!

    Read the article

  • How do I calculate percentiles with python/numpy?

    - by Uri
    Is there a convenient way to calculate percentiles for a sequence or single-dimensional numpy array? I am looking for something similar to Excel's percentile function. I looked in NumPy's statistics reference, and couldn't find this. All I could find is the median (50th percentile), but not something more specific.

    Read the article

  • How do you calculate accumulative time in C#?

    - by lima
    I want to calculate the time span between 2 times which I saved in a database. So literally I want to know the length of time between the 2 values. 14:10:20 - 10:05:15 = 02:05:05 So the result would be 02:05:05. How would I be able to achieve this using C#? 14:10:20 is the format I saved it in in my database.

    Read the article

  • Calculate date from numeric value

    - by elias
    The number 71867806 represents the present day, with the smallest unit of days. How can I calculate the currente date from it? (or) convert it into an Unix timestamp? Solution shouldn't use language depending features. Thanks!

    Read the article

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