How to get the date and time from the internet using MFC - c++

I am trying to build an application for tryout, and I need to download the date and time from the site time.windows.com, so the application will stop working after several days. I thought about getting the local date and time which the user set up in Windows, but I don't think that's very reliable. I thought about using the classes CSocket and CSocketFile and something like that, but I am not sure. Can you superheroes please tell me how to download this information from time.microsoft.com?

Related

XPages are rebuilt automatically when opening designer

I have a customer who likes to do some basic stuff in Domino Designer in a specific database. He only works with Forms, agents etc and never do any Xpages stuff. I have done all the xpages stuff in the Database.
This morning when I opened designer I can see that almost all of the xpages design object has been signed by him. but he has not opened any of the xpages design objects. (only forms) and have not signed the application.
When I look at the webpage I can see that the designn changes I did from a few days back have disapeared, so I seem to be looking at an older version of my webpage.
If I go in to the application and Build the application with my id everything is back to normal.
This scenario seem to repeat only a few times a week even though my customer do changes to the application every day.
Image show the xpages time stamp this morning which seem to be about the same time my customer opened the application in designer.
Currently we are both using 9.0.1 FP10 but I have also seen this problem before FP10
ps.
Not sure if it is related but my customer also have another version of Domino Designer (8.5.3 Swedish) which he use when signing agents as signing them with v9 cause them to not work.
What can be the cause of this behaviour and how can I avoid it.
thanks
Thomas
Open Designer. From the top menu, select Project > Build Automatically and ensure it is disabled (not checked).
For additional reading, refer to Nathan T. Freeman's wonderful article "Taming Domino Designer" https://nathantfreeman.files.wordpress.com/2013/04/tamingdesigner.pdf
I am pretty sure that it's the 8.5.3 Designer that does the rebuild when opening the database in Designer. So this happens when the user just wants to sign some agents.
This problematic behaviour has been fixed in 9.0.1 (or perhaps in a fix pack release of 9.0.1). See this IBM technote about the problem: http://www-01.ibm.com/support/docview.wss?uid=swg1LO80591

How can I learn array database Rasdaman easily?

I'm working at VietNam - HaNoi National University and I've a research at BigData satellite raster image by array database.
A solution is using Rasdaman database which has been developed many years. I've installed this server successfully, try to make some query with this by using this guide from rasdaman.org. Everything should be ok but I've known that this has a GUI tool name Rview.
I can't search Rview from any where (may be it's too old), I need some GUI tool because I some time don't really know what is error in my query and I need some tool that can show me the result (2D, 3D) with interractive viewer.
Please tell me how can I get a tool that can have GUI as MS SQL Database management tool, Phpmyadmin,...
Rview (recently renamed to rasdaview actually, to avoid clashing with vim) is a GUI client for rasdaman that allows to send queries and has some cool visualization capabilities for 1D to 3D data.
The problem with rasdaview is that it has been last compiled 10+ years ago against wxWidgets 1.6x and the code is so outdated and incompatible with recent wxWidgets that it's not possible to compile it anymore without significant rewriting.
So rasdaman comes with this rview binary, which amazingly still works on most systems today. However, since it's not possible to compile it, it's a bit tricky to get it running. These guidelines should help you.
Are you looking for a website where you can execute your DDL or DML statements?
If yes then try SQL Fiddle.

Windows Phone 8 app crashes only after downloaded from the store

Our app has passed review, and our own internal testing with no major issues recognized, however when downloaded from the store, always crashes in a particular spot.
It is quite difficult for us at the moment to get any crash logs, so at this point I am just wondering if anyone else has had a similar issue and what was happening?
The app is a native C++ DirectX project using the FMOD library for audio as well as SQLite for Windows Phone 8.
First of all try to test your app from store on different devices and with different culture/language settings. It's a common bug when parsing from file fails because of different delimiters, DateTime format, etc.
Another common reason - missing capabilities in manifest.
Third reason, thas was causing problems to lot of apps - they try to download something from Internet during the first start, but the connection is not available.
And because you mentioned you have native DirectX app, try to test your app compiled in a same way it's deployed from store. Sadly I can't find the link how to do it right now...
Edit: found it:
How to test the retail version of your app for Windows Phone 8

How to create a login application with Visual Basic (using WebHttpRequest)

Hei there, I'm not experienced at all in C++ as I need to start learning year the next year at my university, though, I've been creating a browser based game and I'm looking for someone to transform it into pc app.
Though, I'm wondering how to make that application send a http request via POST to a file on my webserver with the username / pw.
After all the tutotials I've been reading, I concluded that none worth spending my time with, because they all based on own database, and I'm looking for one that connects to a maestro server and requests the data from there.
This may not be the answer you are looking for, but you may consider two alternatives to a more pure C++ application.
If you already have a working browser game, try to take that same code and put the html/javascript/whatever in a file and give the file a ".hta" extention. It basically opens inside a browser to run your files, but it acts more like an application from the user's viewpoint. (And, as much as I hate Windows, they're pretty fun to create if I may say so). However, your source code with this option is easily read because it can be renamed to a text file (or html file).
You could use Visual C++ (or VB.net, which you have tagged to the question, as well as "Visual" C#) to create an application which mostly consists of a browser view. It could be a "standalone" application (however would rely completely on the .Net framework - may or may not be what you want) that basically accomplishes the same as the option above, but adds that you can "hide" your files inside your application.
Using the two above alternatives, you could make an application relatively quickly that would load your files, which I assume you have already created. Note that neither of the above alternatives will work on anything other than Windows OS's.
If the two above alternatives are not what you want, or if you have questions about either one, I'd be glad to attempt to help.
I've been able to find a friend that would do it in Delphi because I wouldn't want users to download net framework just for this ap.
So the program that would fit most for any apps is Delphi Prism XE (even if it's an addon of Visual Studio)

Excel hangs when printing the first time from ASP.NET webservice

We are using Excel to convert SpreatSheetML to XLS in an ASP.NET webservice. Moreover, if the user checks the right checkboxes, we spawn a thread that uses Excel to print the spreadsheet.
Recently, we have deployed the app in a new environment, and then we started having problems: the first time someone tries to print, Excel seems to hang on the server - i.e. the call to the PrintOut method on the workbook never returns.
But if we log in to the server as the application pool identity and open Excel, send something to the printer, and close it again, printing will work from then on!
I suspect that Excel is showing an invisible dialog - the symptoms are the same as we had earlier, a time when Excel seemed to stall on a "cannot use object linking and embedding"-dialog that appeared when Excel opened.
I know that using server-side Office automation is bad, but this is a legacy app that is very hard to change, so please don't just advise me to re-design our solution.
Has anyone had any experiences with this kind of behavior?
Well, noone seems to have had this problem.
The really weird thing is that my night jobs (ordinary .NET .exe) are perfectly capable of printing - it's only my web services that have this problem.
So I solved the problem by doing what I should have done long ago: I made a simple Windows service with Topshelf, that responds to some MSMQ messages and does the printing, and then my web services can order print-outs via a message queue.
Much nicer in every way!
I've had no end of problems (poor performance, hanging processes, crashing processes etc) using Microsoft Excel, Word and PowerPoint through interop in a web service to print Office documents to PDF format. I too have faced problems that I suspect are because of invisible dialog boxes (maybe a file is corrupt, read-only recommended has been set, file is password protected, or whatever).
I know there are tools available that don't use Office, but they are very expensive. My solution was to switch to automating OpenOffice. OpenOffice seems to be much more stable, and I've left hanging processes and the like behind.
So, while I suppose I am saying "don't automate Microsoft Office", I'm not suggesting that you abandon automation altogether; just that I've had much more success automating OpenOffice than Microsoft Office.
SpreadsheetGear for .NET can read xls or xlsx workbooks and can print to the default printer without displaying any dialog boxes (see the WorkbookView.Print() method).
You can download an evaluation here.
Disclaimer: I own SpreadsheetGear LLC
Like many people, I have seen this sort of behavior. It is caused by using the Office APIs in a server, especially a multithreaded ASP.NET application.
However, you've said you don't want to know about not shooting yourself in the foot, so there's little more to say. You seem to be trapped by the consequences of earlier foolishness.
OK, stop me if you've heard this one:
A man asks a question on StackOverflow. He says, "SO, bad stuff happens when I automate an Office application from inside a service". So, John Saunders says, "So, don't automate the Office application from inside a service. Automate it from inside a desktop application, as Microsoft intended to be done."
When a request comes in for something that requires Excel, you should create a process running a Windows Forms application. The application may have to start with no window, or you may need to start it in the context of a Remote Desktop connection. In any case, the task to be performed may be passed as a command line parameter, or the program can host a WCF service to have commands sent to it.
This program can call Excel just like Excel expects to be called. It can probably even handle more than one command to Excel (one at a time). However, if it hangs, the process can be killed and another one started.
I've never tried this, but it sounds like it would work better than trying to get Office Automation to do something it was not designed to do.