How to remove file associations with IDEA? - file-association

OS - Windows 7 32-bit. Command assoc .java= does not help. I have deleted IDEA. Now I need to delete ALL file associations with IDEA.

Launch regedit or any other registry edit application
Go to HKEY_CLASSES_ROOT in the registry
Search ".java" under this key.
Click on this key and delete the (Default) value

Related

How to modify Chrome ExtensionInstallWhitelist?

I am trying to install extensions on Chrome but it seems to "decide" for me what I should and should not install, which is very frustrating. I have navigated to the "chrome://policy/" and the ExtensionInstallBlacklist is set to "*", how can I change this or add my extensions ID's to the ExtensionInstallWhitelist array? I cannot find this file anywhere on my machine (MAC) and I have looked everywhere including as I found in other threads as a /Library/Managed Preferences/username/. How can I modify the policy settings?
Then I would suggest contacting your administrator. This setting is put into your machine by a workgroup policy.
Even if you were able to change the value locally, it's in place for a reason, and you may get in trouble for that.
Note that you would need a local administrator to access the file. According to the docs, it should indeed be in /Library/Managed Preferences/<username>. And modifying it will not help in the long term.
Here's how I resolve mine:
Find the extension that you want to install and try to install it
0.5 Copy the extension from the pop-up
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallWhiteList
Add a new REG_SZ with the next sequence number and paste the data
Restart Chrome and try to install the extension again
Only for MacOS
Google Chrome restricts installing 3rd-party extensions for better security. The official method to bypass such limitation is to add custom policy. In current version (60) of Chrome, there is a policy entry for whitelisting extension called ExtensionInstallWhitelist. On macOS, one can easily add such policy by running the following command in Terminal:
defaults write com.google.Chrome ExtensionInstallWhitelist -array id
Replace id with your actual extension ID correspondingly. The ID can be found in chrome://extensions by clicking the “Developer mode” box. If you want to add multiple IDs, put id1 id2 id3, etc. after -array. Restart Chrome to take effect. To check if the policy works, visit chrome://policy. To remove the policy, simply run:
defaults delete com.google.Chrome ExtensionInstallWhitelist
This could help install open-source Chrome extensions such as BaiduExporter without warning.
Original source
If you want to remove it:
Win+R
regedit
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
Select the folder containing ExtensionInstallWhiteList
Right click delete

Can you recovered delete folders with sublime text 2?

I think i've deleted a whole folder by accident in sublime text 2. Is it possible to recover this deleted folder? I've checked my trash and nothing.
Using windows 7.
Same thing just happened to me.
Not to worry! Sublime does not permanently delete your files, but only moves them to trash (Recycle Bin). You will find your hard work sitting right there :)
See this reference for more information.
You can easily recover it from thrash / Recycle Bin folder on your machine.
Sublime or any other third party software never delete files permanently, in case of windows, it catches deleted files and move it to Recycle Bin.
In case you don't find in trash as in my case you can use "restore-trash" utility on linux. It can be installed using following command
sudo apt install trash-cli
After installing open command line and navigate to the folder.
Enter command
restore-trash
Choose the file which you wish to restore
If you are on windows, You can look at Recycle Bin.
Otherwise not possible without any advance tool.
Its gone buddy ! I did something similar and couldn't retrieve a file.
Anyway, not sure if it is going to help you but I wrote a simple SLT-plugin to back up modified files (locally and remote).
Local backup plugin:
class RemoteEdit(sublime_plugin.EventListener):
def on_post_save(self, view):
os.system('cp -r %s %s' % (view.file_name(), <backup_path>)) #use scp for remote backup

Table is 'read only'

When I want to execute an update query on my table I got an error saying:
1036 - Table data is read only.
How can I fix that?
Table attributes in /var/db/mysql are set to 777.
'Repair Table' function doesnt seems to help.
Is there anything I can do with that?
In my case, mysql config file had innodb_force_recovery = 1. Commenting that out solved the issue. Hope it helps someone.
who owns /var/db/mysql and what group are they in, should be mysql:mysql. you'll also need to restart mysql for changes to take affect
also check that the currently logged in user had GRANT access to update
(This answer is related to the headline, but not to the original question.)
In case you (like me) are trying to temporarily alter data via the MySQL Workbench interface:
If the table does not have a primary key, MySQL Workbench has no way of identifying the row you are trying to alter, so therefore you cannot alter it.
Solution in that case is to either alter the data via another route, or simply to add a primary key to the table.
In any case, I hope it helps someone :)
You should change owner to MYSQL:MYSQL.
Use this command: chown -Rf mysql:mysql /var/lib/mysql/DBNAME
My situation is everytime I needed to edit "innodb_force_recovery = 1" in my.ini to force mysql to start, and the error log showed some error said:
Attempted to open a previously opened tablespace. Previous tablespace mysql/innodb_table_stats uses space ID: 1 at filepath: .\mysql\innodb_table_stats.ibd. Cannot open tablespace profile/profile_commentmeta which uses space ID: 1 at filepath: .\profile\profile_commentmeta.ibd
I didn't know why this file was not able to open and it caused so many other"table read only" problems to other databases too.
So here is how I fixed this problem in a simple way without hurting other files.
1
First of all, make sure if you add innodb_force_recovery = 1
below [mysqld] in my.ini file, and it is working, under path: X:\xampp\mysql\bin\my.ini
2
Then next step, export all the databases through localhost/phpmyadmin under the export tab, and store them somewhere, like this:
3 comment out the data filefolder to data-bak, then create a new data filefolder,
4 Next step, import all .sql database back from phpmyadmin panel, please also copy phpmyadmin filefolder from the old data-bak filefolder to the new data filefolder. If any file is necessary, go back to data-bak filefolder to copy and paste.
Now all fixed and done, don't need to force mysql to start everytime.
Hope this also works for you.
MySQL doesn't have write access to the database file. Check the permissions and the owner of the file.
On windows I use Xampp server I comment the line in my.ini
innodb_force_recovery = 1 to #innodb_force_recovery = 1 the problem resolved
I solved the same issue by editing app. armour configuration file. Found the answer here: https://stackoverflow.com/a/14563327/31755661
maybe you get read only error from your table storage engine.
Check you Storage Engine, maybe if it is MRG_MYISAM change it to MyISAM and try again.
If you are running selinux in enforcing mode then check your /var/log/messages for audit faults. If you see the tell-tale "****" messages about selinux blocking write access to your table files in / then you need to relabel those files so that they have this label:
system_u:object_r:mysqld_db_t:s0
What you could have is a broken label from copying those files over from a user directory (such as during a recovery attempt).
There's a great resource for selinux here:
https://docs.fedoraproject.org/en-US/Fedora/11/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-SELinux_Contexts_Labeling_Files-Persistent_Changes_semanage_fcontext.html
Just remember that you will need to do this for all of those files, which could be many. Then you will want to run the "restorecon -R -v " command to get the recursive (-R) application of the new labels. There is no support for -R in the semanage command, as far as I could tell.
For reference, the semanage command to relabel looks like this:
semanage fcontext -a -t mysqld_db_t 'filename'
The quoting of the file name is critical for the command to work.
In my case there was a table with read-only state set and when I tried to restart mysql service it would not even start again and with no descriptive error.
Solution was to run fsck on the drive (with many fixes), which was advised after Ubuntu reboot.
I'm running Ubuntu in VirtualBox under Windows and it often hangs or is having functionality problems.
One other way to receive this error is to create your table with a "Like" statement and use as source a merged table. That way the newly create table is read-only and can't "receive" any new records.
so
CREATE TABLE ic.icdrs_kw37 LIKE ic.icdrs ... #<- a merged table.
then:
REPLACE INTO ic.icdrs_kw37 ... # -> "Table is read-only"
bug or feature?

Mercurial Project import in eclipse using SSH key authentication

I have the hgeclipse plugin installed and I have a url source to go and clone from for a project that I need to begin work on. The authentication is based on ssh and my ssh key. I understand from basic googling that I need to set up a .hgr file with the path to the private. Can some one give me more pointers
Actually, you can include the path to the key in your Mercurial.ini/.hrgc file. You don't need Pageant or ssh-agent, unless you need to log in to multiple servers. If you're only ever logging in to one server, you can make your Mercurial.ini or .hgrc file have the following content:
[ui]
ssh = "TortoisePlink.exe" -ssh -2 -i "C:\Users\username\username_rsa.ppk"
This code is Windows-specific but basically, you just specify the path to the ssh program, use the -i flag and specify the path to the private key. That formula should work on all operating systems. If you're on Windows, you put that stuff in a file called "Mercurial.ini" and if you're on any other platform, it goes in a file called .hgrc
Hope this helps!
The private key must be added to ssh and not mercurial / hgrc.
You have to configure your ssh client to use your private key, but this depends greatly on the system you're using.
If you're on linux or mac os x, google some informations about using ssh-agent on your distribution.
If you're on Windows, you can use pageant for example.

How to let TortoiseHg (Mercurial) on Windows use the Private Key file generated (by Puttygen)?

I have used Puttygen to create a public and a private key, and then is ready to let TortoiseHg on Windows 7 do a clone by going to
ssh://somebody#code.somewhere.com/somecode
but there seems to be no where to add the private key to TortoiseHg? (or even just the mercurial command line)
The file is already some where on hard disk as somefile.ppk Does someone know how to add it?
Either add the following to the [ui]-section of the mercurial.ini in your home directory (assuming your key is in "C:\Users\UserName\mykey.ppk"):
[ui]
ssh = tortoiseplink.exe -ssh -i "C:\Users\UserName\mykey.ppk"
or use Pageant, found in the TortoiseHg installation path (e.g. C:\Program Files\TortoiseHg\Pageant.exe). Start it, double click the taskbar-icon that appears, and add the .ppk-file.
need an ssh key generator first
cmd: ssh-keygen -t rsa
open PuTTY Key Generator
Conversions > import key: open the id_rsa file in C:\Users\.ssh (you may have to create the folder !must run cmd as Admin!)
Save the imported file id_rsa as id_rsa.ppk
Open Pageant.exe in TortoiseHG folder
It will show up in Taskbar
Right click and click add keys
Finally add your new ppk file
Oh right copy the contents of id_rsa.pub to hg host