get transfer speed from FileInfo.CopyTo in C# - c#

i need to get transfer speed in FileInfo.CopyTo via c#.
But my search for a suitable alternative not hove good result.
can you help me?

You should try the solution in this answer. In essence, you have to wrap some of the Win32 API calls. The answer from Dennis has some code that should suit your needs.

I’m hardly an expert in this area so I can’t really suggest a full solution but hre are several resources to get you started
http://msdn.microsoft.com/en-us/magazine/cc163851.aspx
Can I show file copy progress using FileInfo.CopyTo() in .NET?

Related

How to execute Go function in C#

Is there any way to execute a Go function from C#? For Python I would use Ironpython for example.
I know that I could spawn a process to execute a Go script, but I don't really want to fallback to such a solution, if possible.
A Google search didn't reveal anything, so is there any way to do that using an API? Or do I have to fallback on processes?
I think Frank's answer is not right! Golang supports many build mode, and one is c-shared mode, it means you can use it like a c module.
e.g:
https://www.trs.ai/c%E8%B0%83%E7%94%A8golang%E4%BB%A3%E7%A0%81/
EDIT: my answer is now not true, since Go has been updated since I posted. this stackoverflow thread will help you solve your problem.
ORIGINAL ANSWER:
I don't think you're going to have much luck finding what you're looking for. Go is statically linked and C# doesn't support that.
From C#, calling a pre-compiled executable and reading the output is the easiest thing I can think of.
you can use grpc implement calls
grpc works across languages and platforms

RTMPS protocol c#/vb.net

does anyone has a clue how the RTMPS-Protocoll works? I haven't found any source code, documentation or libraries for vb.net/c# on the web!
I read somewhere that it's only a TCP connection, but is this right?
If yes, how can I use this?
Could you pleas provide me source code, a library or a documentation?
Thanks in advance!
--
coolerfarmer
Check out RTMPdump I used to work with it a while back so I don't know how well it has been maintained in the mean time. However be sure to have a look at the clean-room specification. I used that document as a starting point to implement my own RTMPS protocol, however I wasn't able to ever finish it.
On a personal note, I would recommend using C# or even C++ to implement a client, if you know those languages as well as vb.net

Image Recognition Intro: Identifying obects on googlemaps

I know, already so many 'how to compare 2 images' question out there.
I have looked at many and could not find anything relevant to my particular need - I apologize if I have missed something I should not have !
So,
Firstly, I am familiar with c#, completely unfamiliar with image processing and recognition.
Secondly, I am not looking for someone to hand me a complete answer, simply seeking to point myself in the right direction to tackle the job in hand.
Objective:
I am seeking to identify the location of certain physical structures on images taken from google maps.
Unfortunately I cannot tell or show what those structures are, but we can use an example, let's say it's a round swimming pool.
Key point maybe, I'm looking to find a small object 'within' a large image.
Considering I've never tackled image processing before, I appear to be completely over whelmed with options of libraries available, names and terminology of functions and capabilities... and I seem to be spending hours going down dead end avenues.
A lot of reading seems to be comparing 1 image with another, rather than an image 'within' an image.
So far AForge & Open CV are the obvious names that have been seen a lot .. but I really can't work out which of them will do this specific job.
Simply, could someone be kind enough to point me in the right direction to get started?
I'm really trying to narrow reading down to subject matter that is relevant to my case.
Basic Principles
Libraries with the required capability.
Any guidance much appreciated.
Many Thanks
Simon
If you want to detect shapes for example, you can use opencv.
Unfortunately opencv is written in c++ and you would have to write your wrapper.
Instead you can use EmguCV. Try to look at this: link

As3 Communicate with C# or Asp.net

I have been looking around for hours trying to find a clear simple solution to my question and have yet to find a good answer. I am trying to do a URL request in flash to my NOPCommerce site. I want to pass a GET value to the my .cs file which i'll then use that value to grab specific information and return it back to flash. How would I set up the C# or asp.net side of things? If anyone could give me an example of what I am looking for I would greatly appreciate it.
I don't know if I am supposed to use a .aspx, .cs or .ascx file.
Thanks,
Brennan
I found it to be extremely simple with web services in as3. Here is a link to see what I mean
As3 Web Services
Use the HttpWebRequest class to GET the variables, do the magic and return a result by invoking the HttpWebRequest again.
Examples and usage here:
http://www.csharp-station.com/HowTo/HttpWebFetch.aspx
You have a few options for server-side communication with flash.
Flash remoting. This is the most popular because it's the most performant, but not the easiest to understand at first glance. It transfers data in a binary format. Available libraries are Weborb and Fluorine.
Web Services as mentioned in a previous post.
Ajax/JSON. I think with Flash Player 11.3, JSON decoding is native in the player now.
Straight up http request.
Sockets (not recommended for beginners)
To answer your question as you asked it, though, for all but #4, you'd be using a CS file to retrieve your data. For #4, you'd most likely be using an .aspx page, but it could be a combination of .aspx and .ascx files.
My recommendation is that you do some research on each of these methods to decide what would work best with your development environment, required level of security, and project. Then, ask specific questions about each method as necessary.
Good Luck!

Play sounds with managed code

I've been trying to create a sound library as a learning project. I get the reading and parsing, I just don't understand how to actually make sound come out of the speaker. I've looked around for quite some time now, but I could never find something that explains this. It seems to be trivial. Am I missing something here? How do I do this in C#?
I would try NBass. It's free and open source, you can peek how they do it in detail.
You can also use the Microsoft Media Player SDK, if you prefer, or the media layer from WPF, which is probably merely the same I guess.
If you want to output things directly then the managed DirectX can help you out, have a look at DirectX.AudioVideoPlayback.
Could you use System.Media.SoundPlayer?
http://msdn.microsoft.com/en-us/library/system.media.soundplayer.aspx

Categories

Resources