I recently installed WordPress on my hosting server and all went fine, however one of my pages "/wp-admin/update-core.php" is having issues. Upon opening, the file appears to be cut off mid way.
I've compared this file against the file in the zip file I uploaded and the original copy is not truncated.
Where this gets even weirder is that, if I edit the file on the server to paste in the missing code, after I save and open again, the file is still missing the code I just added AND is now missing an additional line of code.
I've also tried deleting the file, and re-uploading the original copy again and it appears to be cutting off at the same point.
Anyone experienced this or have any ideas?
I've got a similar problem with v3.37.3 - uploaded .zip file is truncated, and .svg files have zero length. This is true even when I set the transfer type to 'binary' rather than 'auto'. Also, when repeating the copy operation for the .zip file, I am prompted more than once to confirm the overwrite of th eexisting file, almost as though Filezilla sees several files instead of just the one .zip archive.
I had the same problem. I uploaded a file (a Linux executable) and it was truncated from 4,396,728 bytes to 4,392,145 bytes. My fix was to change the transfer type, which you can set using the Transfer menu, from Auto to Binary. I guess that FileZilla assumes that files with no extension are text; other files, with extensions dmg (Apple disk image) and zip (compressed file) were correctly treated as binary. I am using a very recent version of FileZilla: 3.29.0.
Related
I have a broken Adobe Illustrator file. The person creating the file embedded some images from a remote drive that no longer exists, and it makes Illustrator crash. I think the fix should be rather trivial. Part of the .ai file is text-based XML, that contains remote URLs:
<rdf:li rdf:parseType="Resource">
<stMfs:linkForm>EmbedByReference</stMfs:linkForm>
<stMfs:reference rdf:parseType="Resource">
<stRef:filePath>\\123.45.67.89\path\to\my\file\niceimage.jpg</stRef:filePath>
<stRef:documentID>0</stRef:documentID>
<stRef:instanceID>0</stRef:instanceID>
</stMfs:reference>
</rdf:li>
All that I need to do is to write a short script that would replace all remote URLs with paths to the images on the local drive. The problem is that other parts of the file are binary. When I attempt to open the file with a text reader or with Python, it complains that the file is not UTF8-compatible, and would be corrupt if saved. Is there a way to edit only the text part of such half-text, half-binary file, leaving the binary part untouched? A solution using python, bash, sed or whatever you love most would be appreciated.
So the images below were originally a vb files. I have just opened it and it looks like this and the compiler won't run it. I am unsure whether this is a compiler error or whether it may have become corrupt because the project is stored on an external drive. It is just these two forms that have broken like this; I have one other form and a module in the same project that are okay but the project can't run because of the two that are broke.
Broken Login Form
Broken Diary Form
If it changes anything, the designer files for the forms are intact it is just the scripting for the forms elements that is broken.
Also, if I can't identify the cause, is there a way to revert it back to the last working version in visual studio to get my code back? Just because I put a lot of time into it.
The data in those files is most likely gone.
IMPORTANT: Do not write anything to that disk drive unless you find that you cannot recover those files.
If you are using a version control system then you can revert to an earlier version.
If you are using Windows 10 and you happen to have stored those files in a location included in what File History saves, you can recover them from that.
If you use some other form of backup, retrieve the files from that.
If you have a separate disk drive with at least as much free space as the one with the corrupted files, you could try running file recovery software as it might be that the zeroed-out file was written to a different place on the HDD.
TinTnMn pointed out in a comment that if you previously compiled the code, you should have executable files in the "obj" and "bin" folders that can be decompiled to recover most of your work
It could be quicker to re-write the code while it is still fresh in your mind.
I want to intentionally break rar archive for testing purposes.
I was trying to copy archive in the middle or archiving process but it is impossible due to read lock (I use windows 7).
How to do that?
I think opening with editor and deleting some chunks of the gibberish code should work. However, there would still be trouble with the read-lock.
I tested it with a .zip file. After the first delete (first ~10 lines) it was still readable by 7-Zip, after deleting some more lines it was corrupted and Windows Explorer nor 7-Zip was able to open it.
I'm new to ruby ... and shoes... and programming but here is my prob:
I made a timer which puts the timed amount into a txt file as a log. It also keeps an all time running total in a separate txt file. It works as I want it to...
I tried packaging it:
If I package the rb file it doesn't work, it will only work if I package the entire folder including the txt files.
This working copy seems to operate without txt files (they are somehow built-in. Is there a way to package this so I still have access to the associated txt files. (maybe has something to do with the paths...)
thanks.
Shoes Packager behaviour is sometimes ugly. I think you're using windows, so i'll try to explain what seems to happen:
You have a bundled Shoes-App (a standalone .exe file). Every Time you start it by double clicking, it will extract itself in a new temp dir (located under c:\tmp\tempFileDirectory). So, it is a NEW temporary Directory, everytime!
The current path also is set to this tmp directory, which also includes the txt files you bundled into the app, in it's original state. If you change the content of the files during the app execution, and restart the app, your changes are gone, because in the new created tmp dir, there is a fresh copy of the original txt files. so far, it is a BAD idea to put your data files (txt in your case, or SQLITE-database-files, or config files, ...) into the bundles app.
Better way:
create a "hidden" folder (folder's name should start with an ".") in the user's home folder. On windows it should be something like "c:\Users\YourName". Create there everything you need, this directory won't be temporal, so you can access it everytime without problems. This should general be a better solution when programming desktop stuff, not just while using shoes.
Our issue is that our project has files being downloaded using wget to the file system. We are using ruby to read the downloaded files for data.
How is it possible to tell if the file is completely downloaded so we don't read a half complete file?
I asked a very similar question and got some good answers... in summary, use some combination of one or more of the following:
download the file to a holding area and finally copy to your input directory;
use a marker file, created once the download completes, to signal readiness;
poll the file twice and see if its size has stopped increasing;
check the file's permissions (some download processes block reads during download);
use another method like in-thread download by the Ruby process.
To quote Martin Cowie, "This is a middleware problem as old as the hills"...
The typical approach to this is to download the file to a temporary location and when finished 'move' it to the final destination for processing.