|
When changing states in this way it is often best to suppress window updating during the transition, to avoid such flickering.
Veni, vidi, abiit domum
|
|
|
|
|
hello.,
I am new to visual studio.And I am trying to develop "how to send a mail from mfc dialog based application by using c++ language".So any body can tell me how to develope this project
|
|
|
|
|
|
|
See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
|
Dear Friends,
I have been Updating CListCtrl very second. Now problem is, I can't able to drag scroll bar down. Every time List control gets updated and scroll automatically goes up. Can you anyone help me to come out from this problem
Thanks and Regards,
S.Shanmuga Raja
|
|
|
|
|
|
Writing a program to compute n series of Fibonachi (Recursive and No Recursive )
I wrote this for non recursive
#include <iostream>
using namespace std;
int Fibo(int number);
int _tmain(int argc, _TCHAR* argv[])
{
int i,sum,n,a1,a2;
cout<<"enter number : "<<endl;
cin>>n;
i=3;
sum=0;
if(n==1)
cout<<"1";
else if(n==2)
cout<<"1,1";
else
{
cout<<"1 ,1 ,";
a1=1,a2=1;
while (i<=(n))
{
sum=a1+a2;
cout<<sum<<" , ";
a1=a2;
a2=sum;
i++;
}
}
return 0;
}
And this for Recursive mode
int _tmain(int argc, _TCHAR* argv[])
{
int ii=1,nn=0;
cout<<"enter number:"<<n;
cin>>nn;
while(ii<=nn)
{
cout<<"\t"<<Fibo(ii);
ii++;
}
int Fibo(int number)
{
if((number==0) || (number==1))
return number;
else
return Fibo(number-1) + Fibo(number-2);
}
buw my question how can I compare these two methods for memory usage and their speed?
|
|
|
|
|
messages wrote: buw my question how can I compare these two methods for...their speed? How about calling time() before and after?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
No its not a programming project.its about data structure lesson an I have to compute it myself.
|
|
|
|
|
|
I have to compute it myself on the paper without any program. but I cant do it,could you help me please?
|
|
|
|
|
Then you are probably wanting to compute Big O notation, and you can find a really great answer here:
http://stackoverflow.com/questions/3255/big-o-how-do-you-calculate-approximate-it[^]
Big O notation was developed to give a machine independent view of the performance of a piece of code. Since "performance" depends greatly upon what you run it on (your code would be slow on a 386 but fast on a i7-4ghz), there needs to be a way to calculate relative performance. That is what Big O was designed for and it is a very difficult concept to grasp.
|
|
|
|
|
in first program you use more variable
|
|
|
|
|
Hello gurus,
I have posted few questions here basically pussyfooting around the real issue and hoping to learn more about Windows events in the process. So this is almost a re-post. Sorry.
The real issue is with waveOutWrite and assertion of the header flags _ particularity the “loop” WHDR_DONE flag.
I can use event but have no idea how it actually works.
I just cannot believe that the only “option” is plain while / do time wasting loop.
I am looking for this flag to signal end of audio in a few seconds, so I feel doing while loop for such long time is really goofy.
while((pcm[i].whdr.dwFlags & 1) != 1)
{
TRACE("\nWaiting.. %i ",mSeconds );
;
}
I am open to any other solution.
Thanks for your help.
Cheers
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: I can use event but have no idea how it actually works.
...
I am open to any other solution. Any other solution such as?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
I guess I was looking for "magic".
I will combine timer and the while loop and call it good.
|
|
|
|
|
Vaclav_Sal wrote: I guess I was looking for "magic". If you have a solution but have no idea how it works, that's pretty "magical" I'd say.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
mknod(pItem->handler,(S_IRWXU|S_IRWXG|S_IRWXO|S_IFCHR),MKDEV(pItem->nMajor,pItem->nMinor))
is failing with errno 2. Here handler is ~/seq. However I'm running the program with super user.
Any Help would be appreciated.
Thanks,
Sunil
|
|
|
|
|
|
This book will quickly show you (by full example) how to create fully functional WPF applications using C#, XAML, and Visual Studio 2010 or 2012, SQL Server 2012, LINQ, Entity Framework, and the DataGrid
|
|
|
|
|
I have a worker thread running and would like to notify the main thread about changes in the worker thread. Call it synchronization if you prefer that.
I understand “wait for event” does not load CPU (much or nil ) , per documentation.
<b>But if this is a worker thread of low priority would plain while / do loop load on CPU be also OK? </b>
Since I know approximately how often ( in seconds) the event occurs I could use timer also.
The notification is asynchronous, not real time critical.
Any comments on that?
Cheers
Vaclav
|
|
|
|
|
Even though the thread might be low priority, it will still cause 100% cpu usage. I would recommend strongly against it.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I think loop is the worst plan, it waste a lot of CPU cycle.
timer is OK
and sometime thread is a good solution
|
|
|
|