How to ensure the file which I download and the file on the server is the same one?How can I get the file's MD5 value or CRC value before I download it?If file server give this value to me.Will it make the file server too much pressure?(forgive my bad english)
Both protocols have their advantages but I think http is more modern and often better. I also favor http because I often build in cgi scripts to perform certain tasks on the server side. About the CRC: None of these protocols support getting crc. I would use the file time to check if the files are up to date on the client or not. With http you can use HEAD requests to get only the head part of a full request without data, that contains the filetime, size, etc... If you can put in cgi scripts into your http server then you can build in a crc calculator/getter cgi but I think putting heavy load on the server is generally a bad idea. In ftp I don't know if getting crc is possible but my guess is no.
Thanks a lot,now I solved this problem.The file is uploaded by java in web service and a crc32 value is calculated after that.I juust send a message to server.It get me the value.So I know this value.I download the file,calculate the file's crc32 value.At last,I compare two crc32 values.
All well that ends well. Forgot to mention that you can solve it easily with pure HTTP + cgi script as well. If you have the crc3 values precalculated on your sever lets say in x.txt.crc32 for x.txt then the cgi script could handle HEAD requests and it could send a response back to the client that has a custom response header like crc32=blahblah. But its OK if you found a similar solution, java web containers are quite flexible if you used tomcat or something like that...
Nice fight between FTP vs HTTP. I would remove the 'Never chunked encoding "overhead"' point from the list of advantages of FTP because the chunked encoding is a feature of HTTP that shouldn't be used in case of fixed sized files - and usually it isn't used at all in such cases. On the other hand some problems - like streaming an unknown sized log file incrementally (one that isn't closed and finished yet) can only be solved with chunked encoding. So it is a feature that is overhead only if abused.
I have created a dialog in MFC. I have one child dialog. Child dialog opens on clicking a button in Parent dialog. I have two check boxes in child dialog. When child dialog opens first time, On clicking a button, I am selecting one check box by default. I have made check boxes work like radoi buttons. Now when I click on the button second time and select another check box and do something, third time clicking on the button default check box again get selected. I want to retain the state of selected check box, until I close the main application. If I have selected a check box, it should remain selected when I again click on the same button.
Anybody have any idea.?
Please let me know if u want further clarification.
Write public methods in the child dialog class to get and set the state of the check boxes. In the parent dialog, after the child dialog's DoModal returns, call the methods of the child dialog class to get the state of the check box. While calling the child dialog in the parent dialog class, after creating the child dialog and before calling the DoModal function, call the child dialog methods to set the state of the checkboxes.
«_Superman_» I love work. It gives me something to do between weekends.
On click of a ribbon button menu whose member variable is declared at cRibbonView class i would like to know a way to change the text at the status bar(ribbon) whose member variable is declared at cMainFrm class.
solution 2: if you decide to use a windows program then you can get main like argv list by using the CommandLineToArgvW()[^] function. Note that this function has only widechar (utf16) version so you might have to convert the argv values to whatever encoding you use with the WideCharToMultiByte()[^] function before you call your console main().