Click here to Skip to main content
15,885,546 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Need help finding an Algorithm for a project [modified]-with image link Pin
73Zeppelin2-Apr-09 3:44
73Zeppelin2-Apr-09 3:44 
Questiontheory of grahp Pin
mini_25068927-Mar-09 8:00
mini_25068927-Mar-09 8:00 
AnswerRe: theory of grahp Pin
73Zeppelin30-Mar-09 2:45
73Zeppelin30-Mar-09 2:45 
QuestionAlgorithm to generate CPU load in Windows Pin
Rennie7626-Mar-09 2:04
Rennie7626-Mar-09 2:04 
AnswerRe: Algorithm to generate CPU load in Windows Pin
Eddy Vluggen26-Mar-09 2:19
professionalEddy Vluggen26-Mar-09 2:19 
Answerpseudo-code Pin
Luc Pattyn26-Mar-09 2:34
sitebuilderLuc Pattyn26-Mar-09 2:34 
AnswerAdding: Algorithm to generate CPU load in Windows Pin
Rennie7627-Mar-09 0:21
Rennie7627-Mar-09 0:21 
AnswerRe: Adding: Algorithm to generate CPU load in Windows Pin
Eddy Vluggen27-Mar-09 1:50
professionalEddy Vluggen27-Mar-09 1:50 
"Exactly" isn't possible, as you're not the only running proces. Luc [^]has posted you some pseudocode that can be used to load the CPU to a specified percentage.

Here's a possible implementation of that pseudocode;
static void SimulateProcessorLoad(int wantedCPUload)
{
    PerformanceCounter cpuCounter = new PerformanceCounter()
    {
        CategoryName = "Processor",
        CounterName = "% Processor Time",
        InstanceName = "_Total"
    };

    do
    {
        if (cpuCounter.NextValue() < wantedCPUload)
            busyLoop();
        else
            Thread.Sleep(33); 
    } while (true);
}

The idea's; use a PerformanceCounter to get the current CPU-load. If the load is too high, do a Sleep. If the load isn't high enough, fake some processing Smile | :)

I are troll Smile | :)

Questionmethod behind FV function of excel Pin
Rupesh Kumar Swami24-Mar-09 19:36
Rupesh Kumar Swami24-Mar-09 19:36 
AnswerRe: method behind FV function of excel Pin
Roger Wright24-Mar-09 20:14
professionalRoger Wright24-Mar-09 20:14 
Questiondecimal to binary pattern using mantissa and exponents Pin
Sadaiyappan24-Mar-09 12:28
Sadaiyappan24-Mar-09 12:28 
AnswerRe: decimal to binary pattern using mantissa and exponents Pin
Yusuf24-Mar-09 13:03
Yusuf24-Mar-09 13:03 
AnswerRe: decimal to binary pattern using mantissa and exponents Pin
CPallini25-Mar-09 1:54
mveCPallini25-Mar-09 1:54 
GeneralRe: decimal to binary pattern using mantissa and exponents Pin
Luc Pattyn25-Mar-09 3:32
sitebuilderLuc Pattyn25-Mar-09 3:32 
GeneralRe: decimal to binary pattern using mantissa and exponents Pin
CPallini25-Mar-09 3:44
mveCPallini25-Mar-09 3:44 
Questionboolean expression Pin
Sadaiyappan24-Mar-09 4:43
Sadaiyappan24-Mar-09 4:43 
AnswerRe: boolean expression Pin
Luc Pattyn24-Mar-09 4:57
sitebuilderLuc Pattyn24-Mar-09 4:57 
AnswerRe: boolean expression Pin
Roger Wright1-Apr-09 19:59
professionalRoger Wright1-Apr-09 19:59 
Questionlogic diagram Pin
Sadaiyappan24-Mar-09 2:59
Sadaiyappan24-Mar-09 2:59 
AnswerRe: logic diagram Pin
Alan Balkany24-Mar-09 3:49
Alan Balkany24-Mar-09 3:49 
QuestionCode to find BER and MSE Pin
Reshma Naik24-Mar-09 2:27
Reshma Naik24-Mar-09 2:27 
QuestionMaths behind CUMIPMT function of MS Excel Pin
Rupesh Kumar Swami21-Mar-09 21:30
Rupesh Kumar Swami21-Mar-09 21:30 
AnswerRe: Maths behind CUMIPMT function of MS Excel Pin
73Zeppelin21-Mar-09 23:50
73Zeppelin21-Mar-09 23:50 
AnswerRe: Maths behind CUMIPMT function of MS Excel Pin
Roger Wright22-Mar-09 18:36
professionalRoger Wright22-Mar-09 18:36 
GeneralRe: Maths behind CUMIPMT function of MS Excel Pin
73Zeppelin22-Mar-09 21:52
73Zeppelin22-Mar-09 21:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.