Out of Memory when using DataGrip - datagrip

I was trying to open edit a 225MB .sql file in DataGrip, but it opens part of it as a read-only. After that, whenever I click the File panel it returns "Out of Memory".
I've already reinstall and delete the folder C:\Users\***\.DataGrip2018.3, yet the problem exist.

Related

Correct the file associations in the registry in windows 7 when a program is deleted

I have a windows 7 operating system and had installed Rstudio in the my documents folder (by just unzipping the .zip file) as I don´t have admin rights to my computer.
I then manually associated the file endings .Rproj .R and .Rmd with rstudio.exe by:
right-clicking on a file with that ending
selecting "Open with..."
Clicking on "Browse"
Going to the "bin" folder within my RStudio installation and selecting "rstudio.exe"
This worked fine, and the files opened automatically in RStudio when I double-clicked on them.
Over the following months, I updated RStudio twice but did not delete the old versions. Then I noticed that the files were always opening in the oldest version of RStudio (the first one that I had installed).
I decided to clean up, and deleted the two older versions.
At this point, the file associations dissappeared (as expected, since I had just deleted the program they had been associated with).
To associated them to the latest version of RStudio, I repeated the manual steps above, but hit a snag: after selecting rstudio.exe by clicking on the "browse" button within the dialogue box, the program did not appear as an option in the main dialogue box and I could not associate the file with it.
I searched for a solution here and elsewhere but was unable to find one with a complete set of steps that fixed my problem. I did note that this problem is by no means unique to Rstudio, and I suppose can happen to any file endings that have been associated with a program that you have deleted (as opposed to uninstalled?).
I had a suspicion that the path to the old version of Rstudio was stuck in the registry somewhere, but trying various iterations of assoc .Rproj in the command-line didn´t help me:
C:\Users\myusername>assoc .Rproj
File association not found for extension .Rproj
C:\Users\myusername>assoc .Rproj = rstudio
Access is denied.
Also, RStudio was not available in the Default Programs list (accessed from the start menu) and the affected file endings were not listed under File associations either.
I eventually found the solution using windows regedit - but since there doesn´t seem to be a post with the complete steps for this, I have posted it as an answer here, in case anyone else faces the same issue. I had to do this the point and click way, so would be grateful if anyone could provide a solution in the command-line interface, or provide some insight into why I got that "Access is denied" message (which occured even when I tried logging in with a temporary admin account).
It turns out I was right - the old file path was still associated to the file endings in the registry. I was unable to access or edit it from the windows command line prompt, but using the windows regedit program worked, as follows:
Go to the start button, type regedit and click on the regedit program icon to open it.
On the left-hand side menu in regedit, click on the arrow to expand the folder HKEY_CLASSES_ROOT
Scroll down the list to look for the file endings that have become unassociated (in my case this was .R, .Rproj and .Rmd)
Click on one of the unassociated file endings to see what details are recorded for it (these will appear in the right-hand panel of regedit).
See what it says under the Data column for your file ending (in my case, for .R it said “R_auto_file”).
This value (e.g. “R_auto_file”) is the key used to point to the program that will be used to open the file.
Now scroll further down the left-hand menu in regedit, past the zs and keep going until you find a sub-folder with the same name as the key you just identified.
Click on the arrow next to this sub-folder (e.g. “R_auto_file”) to expand it and expand the sub-folders within it (shell and open) until you get to command.
Click on command to view the details in the right-hand panel.
Right-click on the icon that says Default under the column Name in the right-hand panel and select Modify… from the menu that appears.
In the dialogue box that appears, under Value data: you will see an editable file path to the program being used to open the file.
This file path will probably be pointing to the old version of the program that you deleted.
Edit the file path so that it points to the new program, and click ok to save the changes.
Repeat steps 3 – 13 for all file types that have become unassociated.
Restart the computer for the changes to take effect.
You should now see that the files have the program icon next to them and open with the correct version when you double-click on them.
I had a similar issue with RStudio on Windows:
After installing RStudio with the installer I have updated to a newer version via the downloadable ZIP file and installed it into another folder.
Since then a double-click on .Rproj opened the old RStudio instead of the new one despite I tried to reassign the extension with the new RStudio.exe file
My solution was to change this registry entry via a Console:
reg add HKEY_USERS\<Windows SID>_Classes\Applications\rstudio.exe\shell\open\command /f /ve /d "\"C:\Users\Public\RStudio\bin\rstudio.exe\" \"%1\""
Please replace the in the code snippet above with your personal windows user ID. You can get your SID with
whoami /user
A SID looks like this:
S-1-8-21-667978445-1323479522-1885766523-895239
BTW: You could also use good old regedit to change the path (no local admin rights required!)

Restore deleted files in visual studio code in the code management menu

I am really devastated because I have accidentally deleted 3 of my files in Visual Studio Code. I did it through the Source Code Management menu on the left side. Now my question... Is there any possibility to restore the 3 files I deleted like this? I would appreciate any answer and maybe you want to know: I use Windows
:-(
I tried to look into the recycle bin of windows but it isn't there. :-(
vscode maintains a file-history using its latest TIMELINE view.
How to restore deleted git-untracked files in vscode:
Create the files with the same name at the same directory.
Go to TIMELINE on the File Explorer.
You can get the older versions of the files.
No, you cannot recover those files using VS Code or standard tools. They aren't put in the recycling bin (or your operating system's equivalent), they are removed using git cleanor git reset --hard. Condolences :-(
There are of course utilities for recovering deleted files that may or may not be successful, but that is outside the scope of this question.
I accidentally removed a file that wasn't even checked in to git. Google brought me here. The file wasn't in the Trash can either (Ubuntu 18.4 VS Code 1.31.1). Looking at the git output I can see that it used git clean -f to remove it by force).
Fortunately the file was still in the editor. Just press Ctrl+P and type the file name. It should show up in the list of files and if you open it, it says "FILE_NAME (deleted from disk)" on the tab. Just copy/paste the content to where it should be.
if you accidently click the delete menu option right below rename, as long as you don't panic and like restart your computer or something you can open that directory in the file explorer on your computer
and right click.
there should be options there to undo delete or whatever else you did to the directory.
Open VSCode's command menu, and type "Local History" and select "Local History: Find Entry to Restore." Then type the name of the file you deleted.
This has worked for me when "undo" in the file tree has not.
Super easy, and has saved me from despair.

How to add to visual studio solution a file that exists in TFS?

I've deleted a file by accident. Then I created another file with the same name. When I tried to check in the change, it didn't work out and got an error. I undid the changes then deleted the file, there's no more error when I try to check in.
I'd like now to get the latest version of the file before I deleted it.
Thanks for helping.
In TFS, a deletion only takes effect when you check in the said deletion change, and thankfully, this operation is reversible.
Here are the most common recovery scenarios, assuming that the file already had revisions stored in TFS before the accidental deletion:
If the file is still visible in the Source Control Explorer and is marked for deletion (under the Pending Change column):
Then it means that you've deleted the file from your solution (and file system), but that you didn't checked in the changes yet.
Use the "Undo" command of its contextual menu to restore the file in your workspace to its latest version before deletion.
From there, you'll be able to add the restored file to your solution.
If the file is still visible in the Source Control Explorer and is not marked for deletion:
Then it means that you've deleted the file from your file system.
Use the "Get Specific Version" command of the file's contextual menu to restore it in your workspace. In the "Get" window, select "Latest Version" and enable both options.
From there, you'll be able to add the restored file to your solution.
If the file is not visible in the Source Control Explorer:
Then it means that you've checked in the deletion change.
Turn on the "View deleted files" option of the Source Control Explorer (usually the 2nd button of its toolbar) to see your deleted file.
Use the "Undelete" command of the file's contextual menu to restore it in your workspace.
From there, you'll be able to add the restored file to your solution and you'll eventually have to check in the undeleted file to make it available to others, since this file only exists in your workspace.

Deleting a folder in TFS

I created a folder in a TFS Project under workspace "CPortalWS". I deleted the workspace, but now I would like to delete the folder in the project and the delete option is not available.
I've tried to create a new workspace mapped to the project but I still don't get the option to delete.
Is this a bug in TFS? How can I delete the folder?
Any help would be appreciated.
Deleting a folder in TFS is a little strange.
You have to:
Create a Workspace
Get the latest source for the folder (to your local machine)
Inside Source Explorer, delete the folder
Check in your changes (this is the step that deletes the folder in Source Control)
only note that delete is not an actual delete.
the folders/files are still there and kept in Version Control, for example for Undelete scenarios.
You can see them and avail the undelete function if you go to "Tools > Options > Source Control > Visual Studio Team Foundation Server" and check "Show deleted items in the Source Control Explorer" and then right-click on one of the deleted folders.
so, if you want real delete, where the folder/files actually go away you need to use the Destroy Command which is only available from the command line, see link below
http://msdn.microsoft.com/en-us/library/bb386005.aspx
When you delete in TFS, it does not remove it from TFS. It maintains a copy of the deleted files, even when you check in the deletion. This can cause some issues.
To permanently delete from TFS, you need to issue a tfs destroy command.
To do this:
Open a Visual Studio Command Prompt.
Issue the following command: tf destroy $/SourceLocation/Folder. Where $/SourceLocation/Folder is the Source location of the deleted folder in TFS.
Please note: This command will also delete the file(s) from disk.
I had a similar issue, where I had 1 folder which despite being deleted from Hard drive, was still showing as in Source Control (with a green + by the folder). It also showed me the content but if I tried to open any, an error message informed me the file wasn't there.
Clicking on any folder didn't show the delete button. I then realised that selecting a file did! If you don't have a file, create a text file and add it to the folder you want to delete (via Source Control). Click this file, note the delete shows. Select a folder and note that the delete disappears but only after half a second. This small delay is actually usable.
I clicked the file, so the delete button is enabled and hovered the mouse above the delete button. Using the keyboard, I did a CTRL + A and as soon as all files and folders were selected I clicked left mouse button. And it worked! Everything was removed, including (and this is the odd thing) the parent folder.
Create a Workspace; and get latest on the base folder; Dont forget to cloak the relevant folders. If you are going to delete the subfolders then cloak all and get latest on the base folder. So you save a lot of time in pulling files.

Why does vwd.webinfo always get automatically checked out from source control?

We have a 2008 solution that has a file system website as part of the solution. This solution is under source control with Team Foundation Server. Every time the solution is closed it either checks out a file called vwd.webinfo or attempts to and complains that someone else already has it checked out.
Removing the file from source control does not fix the issue because it gets re-added automatically for some reason.
Why does this happen and is there something we can do about it to remove this nag?
Thanks a lot!
open "source control explorer"
find vwd.webinfo in the correct path
click "delete"
chek-in the operation to solve this problem
The file will still be in your file system and solution, but not under source-control. You won't see "plus" or "v" or "lock" button
Go to Property Pages, select Build on the left, and uncheck "Build Web site as part of solution" Then you can delete the file and it won't get created automatically.
You should be able to delete this file manually and have it not reappear. This file holds some information that used to be located elsewhere in the project in earlier versions but apparently is not necessary. Close your solution before deleting the file from source control and on the disk.

Resources