|
"Blocking" and "High performance" are not very compatible.
SledgeHammer01 wrote: Any other options that don't throw exceptions on a cancellation? Catching exceptions is not that expensive. It is with the debugger attached, but you can throw and handle quite a lot of exceptions in a single second if there's no debugger attached.
SledgeHammer01 wrote: Seems like everything that uses the cancellationtoken throws exceptions on
cancellation? Implement your own, disallow cancelling; problem solved.
It would be a cool subject for a CodeProject-contest; writing a fast, multithreaded queue.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
SledgeHammer01 wrote: * blocking get item method should be cancellable (cancellationtoken, bool, etc)
Never understood that need. That can only apply if getting the item requires acquiring other resources and in that case, especially given 5, then either make the caller responsible for that or wrap it is a proxy and that does it.
SledgeHammer01 wrote: I hate APIs that throw exceptions for "normal" behavior.
Its a generic class/API which means if there is a failure mode then it must throw exceptions. If that isn't desirable then write your own. Not that hard and I suspect there are a vast number of examples on the internet.
|
|
|
|
|
jschell wrote: Never understood that need. That can only apply if getting the item requires
acquiring other resources and in that case, especially given 5, then either make
the caller responsible for that or wrap it is a proxy and that does it.
I have a worker thread that monitors the queue. There is not always something in the queue. In fact, most of the time, it will be empty or close to it. Clearly, I should not spin the CPU when the queue is empty.
As for being able to cancel the blocking operation, well... if you wait on a syncronization object indefinitely (the blocking part), it keeps the thread alive (which will keep the process alive) [EDIT: unless the thread is a background thread]. Not a desirable behavior when you, say, want to be able to shut down your app .
Using a timeout is also not a solution, as if you set your timeout too low, you'll spin the CPU, and if you set it too high, you'll have that annoying behavior of your app taking a long time to shut down.
jschell wrote: Its a generic class/API which means if there is a failure mode then it must
throw exceptions.
I wouldn't consider cancelling a blocking operation to be a failure if the cancellation was intended. But some would...
jschell wrote: Not that hard
and I suspect there are a vast number of examples on the internet.
You'd be surprised .
|
|
|
|
|
How to calculate matrix determinant? n*n
|
|
|
|
|
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
A very quick search using your subject as the search term gave 71 million hits: Google: "How to calculate matrix determinant? n*n"[^]
In future, please try to do at least basic research yourself, and not waste your time or ours.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Where are you stuck?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have a DVR and configured my router for NAT Forwarding to my web (9000) and media (9100) port. Using a browser and in different network, I cannot access my DVR's web port and see real-time using IE.
I would like to ask where to begin in programming using C# to develop and application for Windows Phone 8.x or Android for my DVR's media port.
Thanks!
|
|
|
|
|
Strange port numbers are often blocked by the ISP. Try another port.
Benjie Fallar III wrote: real-time using IE. You mean "live". Windows isn't a realtime OS.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Windows isn't a realtime OS.
The deuce you say.
|
|
|
|
|
I have NO problem accessing the media port via LAN/WLAN.
My question is how or where can I start developing a C# programming that capture the live streaming of my DVR cameras from a network.
For example, my DVR media port is 9100 and the IP is 192.168.1.3, thus how can I read the live stream from 192.168.1.3:9100 using C#.
|
|
|
|
|
I have NO problem accessing the media port via LAN/WLAN.
My question is how or where can I start developing a C# programming that capture the live streaming of my DVR cameras from a network.
For example, my DVR media port is 9100 and the IP is 192.168.1.3, thus how can I read the live stream from 192.168.1.3:9100 using C#.
|
|
|
|
|
Benjie Fallar III wrote: I have NO problem accessing the media port via LAN/WLAN.
I cannot access my DVR's web port and see real-time using IE.
Benjie Fallar III wrote: where can I start developing a C# programming that capture the live streaming of
my DVR cameras Do you know the format of the stream? Any other application that accepts the address/port and can display the stream?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
the streaming format is H.264
is there any online documentation or reference on how to start programming live streaming from DVR using C#.NET?
In some Adroid app, like ViewCam, they can connect to remote DVR. I wanted to develop the same application for Windows Phone. So I'm looking for some references to starts with
|
|
|
|
|
Benjie Fallar III wrote: is there any online documentation or reference on how to start programming live
streaming from DVR using C#.NET? You'd need some library to decode the stream and a control to display it. Decoding is usually not done in C#, but using an external library. VLC should be able to do it.
http://libvlcnet.codeplex.com/[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I would like to make an application to register queries in SQL files or XML file .
Is what you have ideas?
Thank you
|
|
|
|
|
Ibrahim.elh wrote: I would like to make an application to register queries in SQL files or XML file . Do you want to detect "SQL code" in those files, or do you want to log stuff that is executed?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I try to make an application that recovers the script of the table and put them in a database
|
|
|
|
|
You'll have to explain more; what script do you want to recover?
You can generate a SQL Script to (re)create the table.
What does putting a script in a database mean here? Executing the script on a database, or actually saving it as data?
I suppose you stopped trying virtualizing the gridview?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
yes I stop trying viruel mode I found another solution , I wish to make an application that connects to a database on a server and saves in csv or sql script to either import it on a mysql database
|
|
|
|
|
Ibrahim.elh wrote: wish to make an application that connects to a database on a server and saves in
csv or sql script to either import it on a mysql database Most databases can export to CSV, and shouldn't be too hard since Informix allows access over ODBC.
That would only export the data, not the structure, the relations or any server-side logic.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
i have a informix database
|
|
|
|
|
That little gem of information may have been useful in your original post!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi ALL,
My requirement is very simple.
I have one string in "HH:MM" format.
Want to store same in DateTime format but same in HH:MM format
example :-
string str1 = "21:56";
DateTime Date = Convert.ToDateTime(str1);
Now we have to store this value in XML and which takes input as DateTime object.. and in xml it should display pnly in HH::MM format
<filetime>21:56
I am unable to find solution for it
Tried couple of options but its not working
please help me
|
|
|
|
|
not quite sure what you're asking for
if you have this (as per your example)
DateTime Date = Convert.ToDateTime(str1);
then you can do this
String dateAsString = Date.ToString("hh:mm");
(12hr format, or use "HH:MM" for 24hr format)
is that what you mean ?
|
|
|
|