Montag, 15. Dezember 2014

CHEAT: Company of Heroes 2 - Ardennes Assault: Unlimited Requisition Points

I'm currently playing the Campaign on Hard difficulty. After succeeding on around 70% of the campaign missions the company strengths of all my three companies were completely drained out. Sadly this turned out to be a deadlock of the game because you cannot complete a mission without loss and loosing more men means that your company will eventually get K.I.A.

BUT! I was surprized how easy it was to modify the requisition point value of a saved game. Turns out that the savegame is saved on a simple to read XML file, so all you need to do is to edit the XML. You have to look for the XML Tag "<requisition>" and put any desired number as a value in it. Save the file, run the game and voila!

The file is located in your "My Documents" folder. I found mine at:
C:\Users\User\Documents\My Games\Company of Heroes 2\Savegames\ArdennesAssault\save4







Dienstag, 15. Juli 2014

SOAP::Lite -> Set HTTP Header

Basically everything is said on the following (I just simplyfied the text a little bit):

By default, SOAP::Lite generates a SOAPAction header with the structure of [URI]#[method].In our case however, we want the SOAPAction to be just the URI, so we have to use on_action to modify it. In our example, we specify on_action(sub { sprintf '"%s"', shift }), so the resulting SOAPAction will contain only the URI (and don't forget the double quotes there).
  So here is my code example:

use SOAP::Lite
my $soap_proxy = SOAP::Lite->uri([THIS IS THE URI I WANT TO USE FOR THE SOAP ACTION])->on_action(sub { sprintf '"%s"', shift })->proxy([HOST URL]);
(following with soap operation and parameters)

The result was that Soap::Lite did not add a # before my action. The URI was delivered as the xmlns separately. I admit, I did not figure out exactly yet how this works. But it does :)

SOURCE

Freitag, 20. Juni 2014

MySQL function to get the current timestamp in SECONDS

Good one.. I had to wander far away to find it :)

SELECT DATEDIFF(s,'01.01.1970',GETDATE())

returns something like:  1403262470