Save file edits for PDTA? - save

So, I recently got Please, don't touch anything. I went through all the endings, and totally didn't look online for a few. Now, I want to unlock all the achievements and stuff, and I really don't feel like restarting my game many, many times to get "Perfectionist." I went and extracted the save file. I have moved it over to text edit, and I have no clue what they used to encode it. Here it is:
Save
endings="2D0100001900000000000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000000000000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F000000000000000000000000"
settings
volume="1.000000"
language
language="UK"
achieviements
perfect_buttons="2742.000000"
red_button_all="-40.000000"
ach_list="2D0100000A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
restarts="103.000000"
all_buttons="2693.000000"
Please let me know what I can do to mess around with this save file. Thanks!

I was just going through this, so here is what I figured out.
All you have to edit is 'endings' value in savedata.ini file
it looked like this after the first ending:
2D0100001900000000000000000000000000F03F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
and like this after the second ending:
2D0100001900000000000000000000000000F03F00000000000000000000F03F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
first 16 characters are still same, then every 24 characters are for game missions, not sure if zeros count or are just separators:)
2D01000019000000
00000000000000000000F03F
00000000000000000000F03F
000000000000000000000000
000000000000000000000000
...
edit that so there is F03F every 24 characters except the last four characters
2D0100001900000000000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F00000000000000000000F03F000000000000000000000000
you can copy/paste this as endings value and try to run the game. Only the last ending needs to be done and you can get perfectionist achievment ;) (delete save file first, run game once and finish at least one ending so the file is complete)

Related

Going back up a line in psql shell

Does anyone know a short cut to going back up a line in psql? I've tried ending with ); and then hitting the up arrow. I can retrieve the line of code that I want and then correct it, but then what? The initial mistake prevented me from CREATING A TABLE, so do I recreate the remaining lines of code from this point forward to finish creating the table. I'm trying to avoid retyping 10 lines of information. I'm using the postgres database and the instructor accomplishing this with very little effort; however, I cannot see the commands he is using to recreate several lines of text which a appear to use only one key. If you look at 52:00 - 53:00 on the instructional video timeline you will see what I mean. After he ends the code with ); He immediately recreates the previous block of code. How does he do this?
Video Link
https://www.youtube.com/watch?v=qw--VYLpxG4
They just cut out parts of the video. No big magic there.
But you could use \e to start your default editor containing the last command you sent. That may be the most efficient way to do this.

How to use bell character (BEL, CTRL-G, \x07) with xterm.js?

How do I add use the bell character with Xterm.js? I see a couple of entries in the sources 'options' defaults, but dont get anything whether i send it from the shell or write it directly to the terminal, even with those set to true. I tried overloading the term.bell function with one containing a window.navigator.vibrate, and that works if I call it directly, but doesnt fire in response to a bell character.
Ok. So testing determined nothing is blocking the bell character ("\x07" or "\u0007") from getting through to xterm.js. It just doesnt respond, even if you enable the flags in the options. The code in the source looks like it should work, but something internal is not connected. Since I am avoiding actual changes to the source to make upgrades to xterm.js straightforward and out of the box, I worked a little magic. Here's a hack to get the bell character working:
Make a function that fires on the "message" event from your websocket. In it, check for a match for BEL. Then have it do your voodoo if it detects it. Something like:
sock.addEventListener('message',function(v){ if(v.match(/\x07/)){ /*voodoo here*/ } });
Where v is event, \x07 is BEL, and voodoo is code or an invocation to blip the screen white briefly, make a chirp, vibrate if your getting around on "mobile", or open a portal to the single-sock dimension.
Annoyingly, now I need to look up more ansi codes and find a pattern, as some end in a BEL character. So this will work by itself, but will be set off by some codes not intended to act as BEL, because they contain that character. More on this later....
FYI, not sure if this works with term.attach(). I have my own thing that does some preprocessing anyway, so basically all I had to do was splice in the if/match, but cut that out, the above code is the minimal cut-paste version.
Hope this helps someone else. Bug out.

Remove first part of a string that haven't fixed length

I ran into some problems with my code and I don't know how to fix it. So my problem:
On a View of my application, there is a filepath displayed like this:
/resume/attachment/12/yaml_error_complete.yml
But I only want the filename as Output, means:
yaml_error_complete.yml
How can i achieve this? I tried with several options like string.slice! etc, but it doesn't work, since the number after "attachment" is increased by 1 for every single upload. At beginning I thought about to simply remove 2 chars, don't matter what they are. But then i ran into another problem that happens when the 100 file is uploaded. In this case i would have to remove 3 chars instead of 2, and i'm again at the beginning of my problem.
May someone of you can help me?
Thanks a lot!
I assume that you need to retrieve the file of a path.
for ex if your file name is "/resume/attachment/12/yaml_error_complete.yml"
Then try this one
"/resume/attachment/12/yaml_error_complete.yml".split('/').last
If I understand your question right, then, maybe it should help you:
a = "/resume/attachment/12/yaml_error_complete.yml"
a.split('/').last
#=> "yaml_error_complete.yml"
In addition to the sulution with split('/') you could do the following
File.basename("/resume/attachment/12/yaml_error_complete.yml")

Parsing a CSV for Database Insertion when Formatted Incorrectly

I recently wrote a mailing platform for one of our employees to use. The system runs great, scales great, and is fun to use. However, it is currently inoperable due to a bug that I can't figure out how to fix (fairly inexperienced developer).
The process goes something like this...
Upload a CSV file to a specific FTP directory.
Go to the import_mailing_list page.
Choose a CSV file within the FTP directory.
Name and describe what the list contains.
Associate file headings with database columns.
Then, the back-end loops over each line of the file, associating the values with a heading, and importing these values into a database.
This all works wonderfully, except in a specific case, when a raw CSV is not correctly formatted. For example...
fname, lname, email
Bob, Schlumberger, bob#bob.com
Bobbette, Schlumberger
Another, Record, goeshere#email.com
As you can see, there is a missing comma on line two. This would cause an error when attempting to pull "valArray[3]" (or valArray[2], in the case of every language but mine).
I am looking for the most efficient solution to keep this error from happening. Perhaps I should check the array length, and compare it to the index we're going to attempt to pull, before pulling it. But to do this for each and every value seems inefficient. Anybody have another idea?
Our stack is ColdFusion 8/9 and MySQL 5.1. This is why I refer to the array index as [3].
There's ArrayIsDefined(array, elementIndex), or ArrayLen(array)
seems inefficient?
You gotta code what you need to code, forget about inefficiency. Get it right before you get it fast (when needed).
I suppose if you are looking for another way of doing this (instead of checking the array length each time, although that really doesn't sound that bad to me), you could wrap each line insert attempt in a try/catch block. If it fails, then stuff the failed row in a buffer (including the line number and error message) that you could then display to the user after the batch has completed, so they could see each of the failed lines and why they failed. This has the advantages of 1) not having to explicitly check the array length each time and 2) catching other errors that you might not have anticipated beforehand (maybe a value is too long for your field, for example).

CAB file API clarification

Since I'm not really seeing any content anywhere that doesn't point back to the original Microsoft documents on this matter, or source code that really doesn't seem to answer the questions I'm having, I thought I might ask a few things here. (Delphi tag is there because that's what my dev environment is on the code I'm making from this)
That said, I had a few questions the API document wasn't answering. First one: fdi_notify messages. What is "my responsibility" is in coding these: fdintCABINET_INFO: fdintPARTIAL_FILE: fdintNEXT_CABINET: fdintENUMERATE: ? I'll illustrate what I mean by an example. For fdintCLOSE_FILE_INFO, "my responsibility" is to Close a file related to handle given me, and set the file's date and time according to the data passed in fdi_notify.
I figure I'm missing something since my code isn't handling extracting spanned CAB files...any thoughts on how to do this?
What you're more than likely running into is that FDICopy only reads the cab you passed in. It will use fdintNEXT_CABINET to get spanned data for any files you extract in response to fdintCOPY_FILE, but it only calls fdintCOPY_FILE for files that start on that first cab.
To get a directory listing for the entire set, you need to call FDICopy in a loop. Every time you get a fdintCABINET_INFO event, save off the psz1 parameter (next cab name). When FDICopy returns, check that. If it's an empty string you're done, if not call FDICopy again with the next cab as the new path.
fdintCABINET_INFO: The only responsibility for this is returning 0 to continue processing. You can use the information provided (the path of the next cabinet, next disk, path name, nad set ID), but you don't need to.
fdintPARTIAL_FILE: Depending on how you're processing your cabs, you can probably ignore this. You'll only see it for the second and later images in a set, and it's to tell you that the particular entry is continued from a previous cab. If you started at the first cab in the set you'll have already seen an fdintCOPY_FILE for the file. If you're processing random .cabs, you won't really be able to use it either, since you won't have the start of the file to extract.
fdintNEXT_CABINET: You can use this to prompt the user for a new directory for the next cabinet, but for simple spanning support just return 0 if the passed in filename is valid or -1 if it isn't. If you return 0 and the cab isn't valid, or is the wrong one, this will get called again. The easiest approach (if you don't request a new disk/directory), is just to check pfdin^.fdie. If it's FDIError_None it's equal the first time being called for the requested cab, so you can return 0. If it's anything else it's already tried to open the requested cab at least once, so you can return -1 as an error.
fdintENUMERATE: I think you can ignore this. It isn't covered in the documentation, and the two cab libraries I've looked at don't use it. It may be a leftover from a previous API version.

Resources