Vista Reverts My Code On Me - file

For some strange reason, when I move a PHP file from one folder to another, Vista copies an old version of the file instead of the current version. This really screws up the web application I'm working on and causes me to waste time in figuring out the problem.
What the hell is going on here and how do I prevent Vista from copying or moving previous versions of a file?
To explain a little further, when I open my PHP file in its current location I see the current version of my code. When I copy the file to the new location and open the file I see an old version of the code.

Check \UserName\Documents\AppData\Local\VirtualStore (or whatever %LOCALAPPDATA%\VirtualStore equates to) and see if somehow you're running into Vista's virtual store with your editor.
(This article explains some of how the virtual store works.)

Related

Any ways to remove a corruped x-wav file?

So, i decided to download Terraria's Dungeon Spirit death sound for a GD texture pack, i was dumb enough to use windows renaming feature to change the file extension from .x-wav to .ogg. Now the file is corrupted, when i try to rename it or the folder its residing in, Windows Explorer crashes. When i try to delete it, the deletion message pops up but never gets anywhere.
Ive tried sfc /scannow, nothing found. Windows Defender scanning, antimalware service executable makes my cpu a frying pan and Windows Defender lags out when it gets to the file. Deleting i mentioned earlier. Renaming (includes back to its original format) i also mentioned earlier. Shredding the file crashes the shredder. Situation is looking pretty hopeless.

Lost code lines when Notepad++ crashed

I was working on a .js file this morning on Notepad++, as usual, when the program just crashed. So I ended it, and re-opened it to see that all my code lines in my .js file, had disappeared, and now all I have left is the file with a size of 0kb because there's nothing left in it. How the hell is that even possible ? It erased everything I typed and saved the file as if there's nothing in it.
Do you know a way to get my code back ? Or did something like this ever happened to someone ? :/ I'm kinda worried because there was a lot of work there and I don't feel like re-typing it all...
When that option is enabled (and it is by default), Notepad++ keeps a backup copy of files you edit.
You can find the backups in the directory %APPDATA%\Notepad++\backup under the format filename#datetime.
I lost four unsaved files when my Notepad++ crashed, I searched through net and found another way to retrieve unsaved files other than backup folder
C:\Users\{username}\AppData\Roaming\Notepad++\backup
Hope it can help others who face the same problem as me. You can try to locate the dump files at
C:\Users\{username}\AppData\Local\Temp\N++RECOV
There will be .dump file inside, this is where I found my unsaved files. You can open the dump file with Notepad++, and see your unsaved works.
This has happened to me a few times lately and I've found a few solutions that make it possible to recover the lost code.
For Windows 7 and probably other modern Windows versions:
Find the file in File Explorer. The size will be 0KB. Right click on it and then choose Properties from the context menu.
Choose the Previous Versions tab. There's a good chance you will find a fairly recent version saved during the latest Restore point. If it's a bit old, it's still probably better than the current 0KB.
Click the Restore button.
My personal optimal solution:
Since this happened to me a few times and the Windows Previous Version was not always up to date, I looked for a different solution that could always give me the latest, most up-to-date version before the 0KB crash.
I discovered that I already had the solution installed on my computer. I have a SugarSync account that always backs up my work files to the cloud. The great part of the service is that SugarSync always keeps the last 5 versions in the cloud, so while the current version will be 0KB, you can download the next to last version and update your file on your computer.
If you have some other backup program, you can check if that service also keeps different versions that you can recover.
I've used notepad++ without any backup for years. One day this happen to me, too.
Here is what I've found as possible solutions:
http://buffernow.com/notepad-plus-crash-recover-your-lost-file/
(similar to Indrajit answer) - not much help. I didn't find my file there.
I have recovered my file one week ago as per answer of Hvck
Same problem here. Same answers:
https://superuser.com/questions/390204/how-to-restore-a-previous-version-of-file-in-notepad
One lesson learned: Use the backup!
use a plugin:
http://www.ilovefreesoftware.com/12/windows/two-plugins-auto-save-files-notepad-auto-save-autosave2.html
use notepad++ backup
http://allinworld99.blogspot.ca/2015/01/notepad-backup-files.html
** UPDATE **
It happened to me again!!! Another way to recover my file: View source on my browser and resave the file to other location. If you are lucky enough to have the file loaded in your browser :) It worked for me for a css file and for a js file.
Comparing the files: what N++ backed-up and the file from browser and files are matching. OMG!
GO to Taskbar click and run %APPDATA%, click to Notepad++ click to backup.
Your files saved by filename.extensionname#year-month-date_time
I know it's too late to answer this, but maybe my answer will help others.
I've encountered the same problem recently. Then it became regular. I did not find a solution to the problem itself, plus it may be caused by many different reasons, so probably no universal solution exists.
However, there is a way to save your files while notepad++ is not closed. Even if the backups folder is empty.
First of all, do not close notepad++. Open a taskmanager, find the notepad++ process and locate the Dump or Create dump file option. Click it. This will create a whole memory dump of the process. This dump will contain the documents you had opened. However you may need to find this data, plus it may be in a different encoding. I guess it is in UTF8 most of the time, but I am not completely sure.
The dump file can be examined with simple programs like notepad++ itself or with a hex editor.
Notepad doesn't auto-save its open file so unfortunately you have lost your work.
On next time you can use Notepad++ it retrieves file automatically
Refer this link may it help you Notepad++ recovery
I tried all the above solutions but nothing was working for me.
But luckily I have opened files one day earlier in eclipse as well. Eclipse and all other IDEs maintain a cache of all the files. You can get the copy of the file from that cache. To get copy from the eclipse.
Right Click on the file Name
Go to Replace With - Previous from the Local History
This answer applies to more recent versions of NotePad++:
Go to the folder of the file, see if there is a subfolder called nppBackup. Recently I've found sometimes the backup wasn't created in %AppData%/Notepad++/backup but it always seems to get created here, with the following file name format [original file name][date stamp]_[time stamp].bak

Trying to find information on how to build a simple file version controll system

Im want to build a file system for non-tecks( dont care about old versions of the file so no merging or svn/git). The thougt is that a user should be able to download a file, in the same instance the file should be locked for other users. When the first user is done editing the, the file should then automaticaly upload to the server. When he closes the file, the lock should den be opend.
Is this even possible? Im thingking a sort of browser plugin, but I cant find anywone that has done the same thing. (besides microsoft, but who want to go down that road)
That would be: Sharepoint, Alfresco, (almost every WIKI), ...
Actually that is a basic feature of most document management systems. Even SVN has that already and IIRC you can set that up with mod_dav_svn without a line of code (considering configuration is not code).
Also the interesting question is, IMHO, not TheHappyCase where the described unit of work goes well but what about this*:
I Checkout 50 random documents you need
(get some popcorn and wait for your stresslevel to go up)
?????
I get bored and forget about it (everything still being checked out)
*: Points (1) and (2) may change order

Does Visual Studio 2012 Save Files That Fool Dropbox?

I am using VS2012 for a new Windows Store app. I have two machines, a Win8 PC and a MacBook Pro, both using the same DropBox account to keep work files synced. Here is the problem. I currently work solely on the PC, using VS2012. Yet I continually get a popup dialog message that the file I have been editing and testing with has been modified by another program, do I want to reload it?
I decline to reload it, and then go to a separate text editing program to compare the two files.
Here is what I find.The file labeled "home.js" still contains the original contents from when I started my editing session. The file labeled "home (Dell1405's conflicted copy 2013-02-08).js" agrees with my latest updates. So it seems that DropBox has tried to sync the newer copy of the file, but is lead to believe that file is from another source, and so marks it a a conflicted copy.
So the "new" file that VS alerted me about is actually the latest copy that was saved when I ran my project in debug mode, and it agrees with the code shown in the VS edit window.
So my question is: While debugging, is VS saving my code file in some temporary area different than the disk location where I see it? And is this what is confusing DropBox (and me)? If so, how can I fix it?
I guess I could shut down DropBox on my PC before starting to work, but then I'd have to resort to sneaker-net to move edited images from my Mac to PC.

Emacs: Often switching between Emacs and my IDE's editor, how to automatically 'synch' the files?

I very often need to do some Emacs magic on some files and I need to go back and forth between my IDE (IntelliJ IDEA) and Emacs.
When a change is made under Emacs (and after I've saved the file) and I go back to IntelliJ the change appears immediately (if I recall correctly I configured IntelliJ to "always reload file when a modification is detected on disk" or something like that). I don't even need to reload: as soon as IntelliJ IDEA gains focus, it instantly reloads the file (and I hence have immediately access to the modifications I made from Emacs).
So far, so very good.
However "the other way round", it doesn't work yet.
Can I configure Emacs so that everytime a file is changed on disk it reloads it?
Or make Emacs, everytime it "gains focus", verify if any file currently opened has been modified on disk?
I know I can start modifying the buffer under Emacs and it shall instantly warn that it has been modified, but I'd rather have it do it immediately (for example if I used my IDE to do some big change, when I come back to Emacs what I see may not be at all anymore what the file contains and it's a bit weird).
Add this to your .emacs:
(global-auto-revert-mode 1)

Resources