|
Thank you for your answer.
Should i study RTSP for that work?
hm... anyway, your answer is very helpful and will be helpful.
However, I am still wondering how to connect to mms url such as "mms://wmc1.liquidviewer.net/WEEI" when programming socket.
The below is extracted on the URL you mentioned.
"As of 2012 Microsoft still recommends[1] using "mms://" as a "protocol rollover[2] URL"."
Therefore, whether or not i use RTSP, i have to know the way to connect mms url with socket for my work.
In this part, do you have any answer?
thank you for your interest.
|
|
|
|
|
|
sure.
I already saw that document and downloaded "[MS-MMSP].pdf" for reading.
Then I read it roughly.
Could you tell me about what i may be missing.
|
|
|
|
|
Sorry, you need to find the references in the document.
|
|
|
|
|
ok, thank you for your attention.
|
|
|
|
|
Dear all:
I use enumdisplaysetting api to get the display orientation.
It return different value of the dmDisplayOrientation of DEVMODE structure in the same degree but different graphic.
For example:
If I rotate the screen in 90 degrees counterclockwise, the api
may return 1 with ati graphic, but 3 with nvidia graphic.
How to get same result in the same degree with different graphic? Or other method?
Best regards, Victor
|
|
|
|
|
1=DMDO_90 and 3=DMDO_270 (from here[^])... why not just check for either condition? when it comes to displays, that's the same thing.
|
|
|
|
|
Dear Holguin:
I must be knowing the display orientation, so that I can process the absolute coordinate to windows desktop.
The Enumdisplaysetting api returns display orientation with different graphic in xp, but same result in win 7.
Does anyelse method to judge the display orientation?(same degree, different graphic, but same result)
best regards, Victor
|
|
|
|
|
cedricvictor wrote: so that I can process the absolute coordinate to windows desktop
This shouldn't matter because coordinates in Windows are always with zero,zero being in the top, left corner of the screen. Whether a screen is rotated 90 degrees to one side, or 270 to the other, you get the same origin reference point (top,left).
|
|
|
|
|
While true, the documentation states "measured clockwise". Provided the user has turned the monitor the same direction using both vendor's drivers, one of them is clearly wrong.
Does WHQL still exist? If so, perhaps Microsoft would like a ping "Hey, you don't check this!".
|
|
|
|
|
modified 2-Jan-15 9:16am.
|
|
|
|
|
Are you and Scholar247 the same person? If so please request removal of one profile.
As to your questions:
- This site does not provide code to order. Google is the place for samples.
- The consequences of a race condition may vary from incorrect results, to a program not responding.
- There are many different situations when this may be appropriate, but it depends on the problem to be solved.
- Impossible to answer as any problem's ease of resolution depends on a lot of factors.
|
|
|
|
|
int g_x = 0;
DWORD WINAPI Add(void* p) //p unused parameter
{
g_x++;
}
void main()
{
HANDLE m_hArr[10];
int i = 0;
for( ; i < 10; i++ )
{
CreateThread( NULL,0,Add,NULL,0,&m_hArr[i]);
}
//Wait for all the 10 threads to complete its execution
::WaitForMultipleObjects(10,m_hArr,TRUE,INDEFENITE);
//Now print the result.You expect 10 but it may not be...
cout<<"g_x = "<
|
|
|
|
|
Because the order of the execution.
Suppose you have 4 floats a,b,c,d
and you want to sum up them.
In case of serial implementation, it will be like a + b + c + d
But in case of parallel, it may execute like
(a+b) + (c+d)
So the result wont be same.
This answers your 4th question.
|
|
|
|
|
2. Consequence of race condition:
Your resource will go to a corrupted state.
Not getting the expected result etc.,
|
|
|
|
|
:
modified 2-Jan-15 9:24am.
|
|
|
|
|
Your question is not clear. What is the connection between mult-threading and rounding errors?
|
|
|
|
|
Richard MacCutchan wrote: What is the connection between mult-threading and rounding errors?
His homework question?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Thanks, I'm not an expert in rounding, but I will stand a round (or around).
|
|
|
|
|
Overheard many years ago that "C is strongly typed language".
So what's up with unspecified / unknown "standard definition " of int abs (int) overloaded by , again unknown source "standard", to <b>float abs ( float)</b>?
Is it just "progress" AKA from plain C to C "whatever is latest derivative of it" or just plain lack of real standards ?
Happy coding in 2015
Cheers Vaclav
|
|
|
|
|
|
Sorry I did not specifically say "C++".
I should have said "is C++ ( and derivatives ) strongly typed " to make the question clearer.
Maybe the question is just irrelevant with overloading, thus academic as I said in title.
Cheers Vaclav
|
|
|
|
|
Exactly, you said "Overheard many years ago that "C is strongly typed language".", and went on to talk about overloading. I responded that it (overloading) was not C it was C++. So I apologise that my answer was not very clear.
|
|
|
|
|
I should have said "is C++ ( and derivatives ) strongly typed "
No need. You just mixed concepts when including overloading - that's like comparing apples with the act of driving a car.
So restricting the question to C, it is indeed a strongly typed language, but in some instances not entirely strict about it. C++ is stricter.
For further reading, see f.ex. this wikipedia page.
|
|
|
|
|
How does one arbitrarily enable or disable a button on the Ribbon bar?
The OnUpdateCommand handler only allows you to specify a change in response to a button-click. But I want to enable or disable the button from elsewhere in the program.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|