I am using KDevelop 4.3.1 with Debian Wheezy.
My problem is, that for every file in my project directory KDevelop seems to create a backup file with the same name, ending with a tilde. This makes the project directorys look really unclear.
My question is if there is an option to hide these backup files (e.g. all files ending with a ~) in KDevelop? Meaning in the sidebar list of project files.
The backup files are created on save by the text editor component "Kate Part". To get rid of the *~ files, you have two options.
First, open the editor settings dialog through Settings > Configure Editor and then choose the Open/Save item, and then the Advanced tab.
Disable backups
To disable backups entirely, remove the checkbox for [ ] Local files.
Hide the backup files
To hide backups, just add the Prefix: ., so that every backup file is a hidden file. A backup file is then named e.g. .MyFile.cpp~.
The idea behind the backup files is to have the old version around in case the saved file is corrupted for whatever reason (system crash, file system error, ...?). In practice, you most probably do not need backups at all for the following reason:
When saving files, Kate uses the class KSaveFile (in Qt5 available as QSaveFile). In short, to avoid data loss, KSaveFile saves the file to a temporary file in the same directory as the target file, and on successful write finally moves the temporary file to the target filename.
In other words, saving files is pretty save and in theory should always work due to the atomic rename thanks to KSaveFile.
So the only use case for backup files are that you changed and saved a file by accident. In this case, the backup file still contains the old data provided you did not save twice.
Even more so: If you use a version control system (git, svn, ...), the usefulness of having backups is close to zero. That's also the reason why backups are disabled entirely in newer versions of the editor component.
If you use this filter (in the top of the file list):
[A-Z]*[A-Z]
You may only see files starting and ending with a letter so no hidden files (starting with a '.') and no backup files (ending with a '~') will be shown.
Be careful as any other file not starting or ending with a letter will also be hidden
Related
I'm working with PyCharm 2019 and Django, in Windows 10 in a project that I haven't opened in a year. The Project files window is showing up as yellow, which seems new. What does this mean and how to I get the files to appear as white.
What the yellow background usually means is that the files are excluded form the project (it can also mean the files are "read-only").
This might happen for several reasons, the .idea folder might have broken and you need to delete it and recreate the project. If your project is installed in a venv sometimes the source files are marked read-only (which means the source files being edited are the versions installed in the venv).
So here it gets complicated because it can depend on the specifics of the project itself.
My usual steps for this problem are:
Close and reopen the project.
See if marking one of the directories as sources root changes the file color in the project tree. (Files might have been marked as excluded from the project for whatever reason.)
Just to help diagnosing the issue, open a search and go to costum scopes, see what scope those directories are associated with.
Check if file permissions are read-only. This can happen if you logged into PyCharm (or the OS) with a user account that doesn't have editing permissions on those files.
Delete the .idea folder (so the IDE recreates it) and create a new project with those files. (Remember to make a backup copy.)
I want to display the version on the installation dialog pages of nsis, by reading the version from a text file, but i have to copy this on the destination pc where the executable is run, but i want that the text file is not copied on the user's pc but is only read from,
that is,
i want to include this file into the exe, and read text from it to display on the nsis dialog pages, but not copy it anywhere on the pc wherever the exe is run?
is this possible? or is there any other way of doing this?
In general, you can use $PLUGINSDIR constant. It is de-facto temporary directory on target system and you can put there something and use. Following code will copy the file into the temporary directory on the target machine, but whole directory will be deleted after the installation completion. (InitPluginsDir is needed somewhere before)
InitPluginsDir
File /oname=$PLUGINSDIR\blah.txt "..\myfile.txt"
But in your case, it could be better to solve it in some other way. You can define some constant containing version number and use it in the code, can't you? The !define command could be in generated file so you can automate it...
I was wondering how to:
create a droplet that saves to a relative filepath.
let's say the droplet is on the desktop in the folder "batches" and this folder also contains the folder "output". Everything that gets dropped will end up in the output folder.
I've noticed that photoshop saves a fixed path to this folder. This renders the droplet useless on any other computer than my own.
Even further pondering:
Is it remotely possible to let photoshop prompt the user once for a destination. This could also be an acceptable solution to the above.
Thanks in advance for any comments,tips,remarks,etc.
T
In my experience, the best and simplest way to handle this is to make a working copy of the files you want to transform. Then when creating the droplet, choose "Save and Close" to overwrite the source files.
The danger of this method is that the user will overwrite source files. However, this can be remedied by creating a script or Automator action around the photoshop droplet. It would first copy the files to the destination, then run the droplet.
I am using TortoiseHG for source code control in Windows, I forgot to edit the ".hgignor" file, and now I have a huge folder ".hg" which I know it's because of DLL and EXE and PDB files which I do not need them. Now changing the ignor file does not remove those files.
What should I do for deleting these files completely from my TortoiseHg data source?
if you want to stop tracking files, but leave them in working directory, use hg forget. Help also says you can achieve the same effect by using hg remove -Af.
I'm not sure what do you mean by «data source», but neither of those will remove the files from repository itself, because they are already a part of your history, and thus their previous versions will remain there. Forgetting them will only prevent your history from bloating even further with newer versions of those build artifacts.
You can use the hg remove command to remove files in your repository. If you are using TortoiseHG, you can right click on the file and go: TortoiseHG -> Remove File.
Check out the "How to stop tracking a file" section Here.
Is there any built in way to read a file with SSIS and after reading it clearing the file of all content?
Use a File System Task in the Control Flow to either delete or move the file. If you want an empty file, then you can recreate the file with another File System Task after you have deleted it.
My team generally relies on moving files to archive folders after we process a file. The archive folder is compressed whereas the working folder is uncompressed. We setup a process with our Data Center IT to archive the files in the folders to tape on a regular schedule. This gives us full freedom to retrieve any raw files we have processed while getting them off the SAN without requiring department resources.
What we do is create a template file (that just has headers) and then copy it to a file of the name we want to use for processing.