How to edit cgi files nagios in particular - cgi

i want to edit my nagios cgi files but the keep opening as bin files. Does anyone know how to edit them or has anyone edited it before (nagios).
The reason i want to edit it is i want one of the pages to show columns instead of three, i checked the css but its not there.
Regards

Nagios config files are compiled into bin files. If you want to edit them you need to download the source, edit that, and compile again. Suggesting to the developers that the number, order, and type of columns seen be read from a config file might prove useful for the future.

Related

How to configure IntelliJ products WITHOUT editing files in bin?

I'd like to set some specific options in idea.vmoptions and idea.properties for IntelliJ IDEA 14, but I don't have access to those files in C:\Program Files\... (yes, that's Windows, don't troll ;)
Is there a folder in %UserProfile% or an environment variable I could set to read those files (both vmoptions and properties!) from elsewhere?
Please don't suggest to copy the whole IDEA folder elsewhere, there's a reason why I can't access it. I would be interested in a Linux solution too, the same would most likely work on Windows.
My Research
For Mac there're specific instructions at Increasing Memory Heap, but for Linux and Windows it's just filename which are trivial to find out anyway.
I also found IntelliJ IDEA files locations, but it says can be modified in IDEA_HOME\bin\idea.properties which doesn't help since I can't access that file, but want to change properties in it.
Update: Simple Answer
Create IDEA_PROPERTIES and IDEA_VM_OPTIONS environment variables and point them to the files you want, restart IDE, done.
Also see documentation for more (and maybe report that it lacks any mention of IDEA_PROPERTIES).
You can use %USERPROFILE%\.IntelliJIdea14\idea%BITS%.exe.vmoptions on Windows as custom options file. I tried it and it works.
Another way that I haven't tried, but I think should work, is to copy idea.bat and edit it to use the file you need.

How do you view Ignored files in AccuRev?

Is there some way to view files in the AccuRev Client (v5.7) that have been ignored?
For some reason or other, some code files that do not follow the pattern in the .acignore file or the ACCUREV_IGNORE_ELEMS env variable get ignored. These are java files in directories with other java files, so there is no way that it could match the ignore restrictions. But that is another problem.
So if I want to see which files in a local accurev workspace are ignored across all directories, is that possible?
(Note: The Tools-Preferences-General tab menu item of "Show External Objects" - "Include Ignored Objects" shows ignored items - if you know what directory they're in)
Any help is appreciated. This has happened several times, and I'm losing code.
(pining for my old svn days)
edited
I can see the ignored files, if I know that they are there. So I can drill down to the specific directory and see them listed in the workspace explorer results. But if you have many, many directories ... you shouldn't have to manually look into each directory to see if there are ignored files.
To answer your question, you need to set this preference (but you already know that):
The Tools-Preferences-General tab menu item of "Show External Objects" - "Include Ignored Objects" shows ignored items - if you know what directory they're in
Can you post the contents of your .acignore file and ACCUREV_IGNORE_ELEMS env variable?
Also, include the output from the command 'accurev stat '?
Maybe we can solve your problem.
As Jason mentioned, the status of the individual files may help to explain what's going on. If you see "missing", then the files are not present on disk. Also check your include/exclude rules. Files that have been excluded won't be present on disk or seen in the AccuRev workspace explorer.

___jb_bak___ and ___jb_old___ files in PyCharm

When I got some PyCharm project from my colleague I saw some backup files of *.py files.
This files have types: *.___jb_old___ and *.___jb_bak___.
I open the files in Notepad++ and see that these are identical backup files of the corresponding *.py files.
I asked my colleague, but he didn't know what these are.
Why are there TWO identical backup files for each *.py file?
How can I tune PyCharm? We want to turn off this backup.
Google gave me nothing :(
You can disable "safe write"
Use "safe write" (save changes to a temporary file first) If this
check box is selected, a changed file will be first saved to a
temporary file; if the save operation is completed successfully, the
original file is deleted, and the temporary file is renamed.
https://www.jetbrains.com/webstorm/help/system-settings.html
i had this problem in webstorm when a script file was running and i was editing it in webstorm. when i stopped the script and edited it everything was fine
it's a temporary file used by PyCharm to make sure you change will not be lost when editing files. it's safe to delete them manually, you will only loss very recent changes. IntelliJ IDEA works the same as PyCharm.
How to delete them?
To delete a file on a file system requires two things: 1)you have the permission. 2)no program is using it.
so make sure you have 'w' the permission, and stop all program which is using it. then you can remove it.
How to know which program is using it?
Normally you should already know it. but sometimes some background programs(like crash plan, google drive sync, e.g.) may also hold it quietly, then find and kill all programs may be very tricky. the easiest way is reboot your computer with 'safe mode', in which only the OS kernel is loaded.
I spend two hours to figure out the reason why I cannot delete the temp file even when I have whole permission. a crash plan service is holding it in background. This may not be your issue, but if you cannot delete the temp file, this will save your time.
While JeremyWeir's solution probably does work, the real fix - imo - is to enable write permission on the directory.
Saving a file would only need write permission to that file itself. But with the "safe write", you need permission to create the file and rename it - which means you need write access to the directory.
In Linux this would be e.g. chmod ug+w DIR, if you want to give write access to user and group.
I have exact same issue with PhpStorm after system crash. The fix I found was to manualy delete *._jb_old_ and *._jb_bak_ files and reinstall PhpStorm

How do I exclude folder from 'find', but still browse in the Project view, in intellij?

Any way to do this? Cause it keeps indexing and searching through my log folders, and i want to exclude the folder from find, but be able to browse and look at the files.
Sorry, but it's not possible. Exclude works globally. There is a related feature request, feel free to star/vote.

Intellij Idea problem with text file impossible to read

I have a problem using Intellij Idea.
I am absolutely unable to load text file as InputStream - it doesnt matter where do I put the file (main/java, main/resources...) it just can't find the file - in Eclipse everything works just fine.
I tried setings->compiler->resource patterns and added ?*.txt but that doesn't seem to work either.
Any help is appreciated.
If you load it as a File, make sure that Working Directory is properly set in IDEA Run/Debug Configuration, since it's the default directory where Java will look for a file when you try to access it like new File("file.txt"). Working directory should be set to the directory of your project containing .txt files.
If you load files as a classpath resource, then they should reside somewhere under Source root and will be copied to the classpath according to Settings | Compiler | Resource Patterns.
If you can't get it working, upload your project somewhere including IDEA project files so that we can point to your mistake.
Look at the image, notice that the txt files are in the project root, and not the source folders (in blue).
If you open the Project Structure dialog, and click on Modules and select your module - are the correct folders marked as Source Folders on the sources tab?
Link for how to get to Project Structure dialog
Also, if you print out the absolute path of that file you are trying to read, is that anywhere near where you expect it to be?
An easy way to figure out the same would be to try creating a file in the same fashion and see where it gets created in your project. You can put your input file at the same location and it should work just fine (if it doesn't, you should check your resource pattern which might be causing the file to be not copied over in the build output).
This method actually gives you the working directory of your intellij settings which is pointed out in the accepted answer. Just sharing as I had similar trouble and I figured out this way. :)