My project consists of thousands of C++ files and after many 'out of memory' from the indexer errors, I finally have it all indexed; it's now 29GB.
I have several questions/issue:
Backup
Once, when Eclipse crashed, it corrupted the .pdom and I had to restart the indexing. If I make a backup of the .pdom and move it to a diff folder, can I restore a corrupted indexer database by simply replacing the corrupted .pdom with the backed-up one?
In the folder .metadata\.plugins\org.eclipse.cdt.core, there are the following files
project_name.1461683934892.pdom
.log
project_name.language.settings.xml
language.settings.xml
I may encounter more issues (like cache and speed of 'go to definition'). If so, I'll update this post
Related
I'm using the new Visual Studio 2017. I follow this tutorial to change the default (temp) path where store .db and such.
It correctly moves *.VC.db files, but I can still see these files into the .vs within the solution's folder:
Solution.VC.db
Solution.VC.db-shm
Solution.VC.db-wal
I'd like to also move these data. How can I do it?
The guide that is the source of all these tutorials and advices is https://blogs.msdn.microsoft.com/vcblog/2010/03/09/intellisensebrowsing-options-in-vc-2010/
You are trying to get rid from you *.db files in {ProjectDir}/.vs/{SolutionName}/v15{(VS version)}/ and following the old guide for ipch files
you successfully moved Browse.VC.db fie. However
Solution.VC.db
Solution.VC.db-shm
Solution.VC.db-wal
Are not browsing files and have nothing to with Intellisense. They are
Project Preload files and needed only to speed up VS hefty loading of solutions.
The answer to your question: No, you can not move them to the other folder by the means of VS options. They are supposed to be internal matter of VS speeding up the openage.
2 of this 3 files should disappear when you close the solution( the heaviest one will remain)
However there is a lot you can do about it:
1)You can turn them off completely by Tools->Options->Text Editor->C/C++->Experimental in Enable Faster Project Load = False
2) If you'd like to leave project load(I don't feel much difference, but maybe I don't have very big projects) you can always clean files ad hoc by Project->Properties->Build Event->Post Build and entering any console command you'd like removing files from that folder- that will happen each build, which is what you want in the end when you close it.
3) You can hack their size to zero by using symlinks - just create symlink with the same name(by a script, maybe) that to points to the location you like and VS won't spot the difference.
Also, you can turn off browsing db in the Advanced - it will turn off Intellisense (or leave where you moved it).
I hope it helps to solve this issue with heavy untransportable files.
Two things
how to control or manage the path where .vs folder is created?
Currently I couldn't find a way for this - its still created next to solution folder (I am using VS 2019)
how to control or manage the path where the contents (like Browse.VC.db and including the other temp ones like Browse.VC.db-shm, Browse.VC.db-wal & Browse.VC.opendb) are created?
Solution: Use Fallback Location
Visual Studio > Tools > Options > Text Editor > C/C++ > Advanced > Browsing Database Fallback > "Always Use Fallback Location" as true and provide a valid path to "Fallback Location".
After this, I have to restart VS.
This is especially useful when you are using cloud or web drive for your solutions and / or projects and don't want these temp files to clutter and consume more spaces.
I made a very foolish error with a large image directory on our server which is mounted via S3FS to an EC2 instance and I ran Image_Optim on it. It seemed to do a good job until I noticed missing files on the website, which when I looked id noticed were files which had been left at 0kb...
...Now fortunately I have versioning on and a quick look seems to show at the exact same time on all the 0kb files is the correct version as well.
It has happened to about 1300 files in a 2500 directory. Question is, is it possible for me to batch process all the 0kb files and tell them to restore to the latest version that is bigger than 0kb??
The only batch restore tool I can find is S3 Browser but that causes you to restore all files in a folder to their latest version. In some cases this would work for the 0kb files but for many it won't, I also don't own the program so would rather do it with a command line script if possible.
Once your file(s) have become 0 bytes or 0kb, you cannot recover them, well at least not easily. If you mean restore / recover from ext. Backup then that will work.
I recently started working with WxWidgets (2.9.4) and was working through a tutorial I found, but it seems that I'm unable to load any images. I've already properly used the handler (for PNG) and the problem happens at run-time. Below is an image of the popup that is displayed when attempting to run the program.
Here is the code:
wxPNGHandler *handler = new wxPNGHandler;
wxImage::AddHandler(handler);
wxBitmap exit;
exit.LoadFile(wxT("exit.png"), wxBITMAP_TYPE_PNG);
wxToolBar *toolbar = CreateToolBar();
toolbar->AddTool(wxID_EXIT, exit, wxT("Exit"));
toolbar->Realize();
Connect(wxID_EXIT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(mainWindow::exitProg));
Any help is appreciated.
EDIT: I forgot to mention that when I click Cancel, this happens:
I placed the exit.png file in the build directory (/Debug or /Release) as well as the source code directory, but it still has yet to see it.
What is your working directory?
If you are using visual studio and running using the interface ( F5 or ctrl-F5 or the little run button in the toolbar ) then your working directory is the folder containing the project file. So try copying your image file there.
Or open a command window, cd to one of your build directories, and run your app from the command line.
In general, to avoid this sort of problem, I alter the project properties so that the executable is NOT stored in one of the build folders, but in a new folder ( which I usually call 'bin' - my unix roots are showing! ) and also alter the debugging properties so that the working directory is the bin folder.
There are a couple of advantages to this technique:
Both the release and trhe debug version use the same folder, so you only need one copy of any extra file, like your image file.
It is easy to see the executable and extra files in the working directory without being distracted by all the .obj files that end up in the build folders
IMHO this is well worth the little extra trouble in maintaining non default project properties.
First of all, to avoid problems deep inside wxToolBar, always check the return code of LoadFile() or, alternatively, use wxBitmap::IsOk() to check that the bitmap was successfully loaded.
Second, while adding the handler explicitly as you did is perfectly fine, I'd recommend to just call wxInitAllImageHandlers() as it's simpler and has no real drawbacks unless you are looking to create the smallest program possible.
Finally, to address your real problem, the file clearly doesn't exist at the path you're loading it from. You can, of course, solve this by being careful not to change your working directly (or restore it after changing it) in your program and by placing the file in the correct place. But this is, as you discovered, error-prone, so a better idea is to always use full paths to your resources. To construct them, you will find wxStandardPaths useful, in particular its GetResourcesDir() method.
What I am doing is 'checkout' (if its new) or 'update' website code from subversion.
Then I compile all code, proceeds if successfully compiled and FTP all compiled to another location where Website is hosted replacing all existing code.
All is done in Final Builder 7.
My question is how I put ONLY CHANGED FILES (last commit on Subversion) on FTP location after successful build and compiled in FB7, and files should be published?
Sounds as if you would need to keep a cache of files from previous build, and then check and compare each of them using "File Compare" action.
But what is the motivation behind it? Just replace the whole build output. Attempting segmental updates will inevitably lead to something not being copied or updated.
I have a StarTeam repo that I'm trying to migrate to SVN. Unfortunately the repo is HUGE, so I can't use any of the polarion scripts, etc. I'm resorting to checking out snapshots of each release in StarTeam and then manually adding/committing them to SVN.
However, I'm confused about what to do for old files. In StarTeam, we had to move deleted files to an "obsolete" folder since the purge command removed all copies of the file. I know that I don't need to do that in SVN, but how does SVN deal with files which have been deleted/are missing?
Say I have three files in the following structure:
trunk/
Src/
A.cpp
B.cpp
C.cpp
If from one release to another I deleted "C.cpp", do I just need to commit all of src for the deletion to be reflected in the SVN repo?
Likewise, if I deleteed "C.cpp" but added "D.cpp", I would need to call add on all of "src/" before committing. Would that cause any problems with detecting and deleting the missing files? There are too many of them to go through manually and delete every one individually.
As a separate question, is there a reason why it takes tortoiseSVN almost 3 hours to detect which files are changed before I can add/commit? All I see is the "Please wait..." message in the dialog box, and it takes FOREVER.
Thanks!
Any change you make to the repo needs a commit, so yes after doing svn delete you need to svn commit. Similarly when you add files, that's a change that needs to be committed. In both cases it's possible to undo the add and delete without commiting.
In terms of adding and removing files in one transaction, again that "just works", you'd effectively issue:
svn delete C.cpp
svn add D.cpp
svn commit
If you want to recover a deleted file, then you can just recover the file from an earlier revision of the svn repo, then recommit (see also What is the correct way to restore a deleted file from SVN?).
The main thing you must remember though when deleting files: you must delete it using subversion tools (i.e. from the command line as svn delete or using Delete within TortoiseSVN. Just deleting it using del, rm, or a file manager like windows explorer will have SVN see the file as "missing" and not "deleted", and a commit of the repo will not commit the delete; thus the next time you update your working copy, the missing files will be restored. Thus you use subversion to delete the file so subversion knows that you do actually want it deleted.
For your last question -- what version of SVN and how big is the repo (in terms of file-count). Essentially T-SVN has to walk the tree and check each file against the repo-version to see it it's changed. As of SVN 1.7, the working copy format changed with a lot of metadata being held in the database, and improvements to the storage of pristine copies (i.e., what the file looked like when it came out of svn) means that it's faster than it was. If you aren't using 1.7, then it's worth checking out. Also, if you have a large repo but only work in a small part of it then consider using sparse checkouts to reduce the size of your local working copy. See this answer to Checkout one file from Subversion for a brief overview or sparse checkouts.