[Neo]Vim can't open sourced file - neovim

So I've got the following init.vim under ~/.config/nvim/
source plugins.vim
plugins.vim lives in the same directory.
When I'm opening [Neo]Vim I always get
Error detected while processing /home/luke/.config/nvim/init.vim:
line 1:
E484: Can't open file plugins.vim
Does anybody know what I am missing?

The path for source command is always taken relative of the current working directory. Hence, you should specify full path instead. For example,
source <sfile>:h/plugins.vim
Another possibility is using runtime command that does searching along the 'runtimepath'. E.g.
runtime plugins.vim

Related

How to run `forest schema:update` outside project directory?

I'm trying to use the forest-cli schema:update command, but when I do, I keep getting the error:
× We are not able to detect a Forest CLI project file architecture at this path: /PATH/TO/REPO/ROOT.: Error: No "routes" directory.
There is a routes directory, but within src/ below the repo root. I have tried running forest schema:update from inside there, but I get the exact same error. The command only has options for a config file and an output directory.
Googling has turned up nothing, and there's no obvious hint from forestadmin's documents. Thanks in advance for any assistance!
According to the forest-cli code available here, the forest schema:update command requires the package.json file to be directly accessible in order to run (In the same folder you run the command), to check that the version of the agent you are running is indeed compatible with schema:update.
You can also use the -c/--config option in order to use another location of your config/database.js, and the -o/--outputDirectory to output the result to a new location.
In your case, I would say that forest schema:update -c src/config/database.config.js -o tmp should allow you to generate the files in the tmp directory (Be aware that this directory should not exist).
This command should be run where your package.json is located.
However, I don't think you will be able to export files directly at the right location when using a custom folder structure.

Doxygen failed to run html help compiler, hhc.exe error HHC5010 when running from folder that has a parent folder that starts with "."

I am using Conan package manager on Windows to create a package. The conan command to create the package copies files to a folder within %USERPROFILE%\.conan (or C:\Users\xxxxxxx\.conan). Then from this location it builds a Visual Studio project and ultimately calls doxygen.exe to create a .chm help file in a post-build command. The doxygen command fails with:
error : failed to run html help compiler on index.hhp
Further investigation reveals the hhc.exe command executed by doxygen is failing with:
C:\Users\xxxxxxx\.conan\data\Module\1.0.0\user\channel\build\524dc97e4a3dd1f774ea3897f9e4faf26c5457d2\Documentation>"C:/Program Files (x86)/HTML Help Workshop/hhc.exe" html\index.hhp
HHC5010: Error: Cannot open "C:\Users\xxxxxxx\data\Module\1.0.0\user\channel\build\524dc97e4a3dd1f774ea3897f9e4faf26c5457d2\Documentation\html\Module.chm". Compilation stopped.
Close inspection reveals that in the error message, the ".conan" folder is missing. Sure enough, I confirmed that hhc.exe fails when the index.hpp resides in a folder that has a parent folder that starts with a ".".
Attempts to resolve this:
changing the Doxyfile setting OUTPUT_DIRECTORY to "$(TMP)/DoxygenModule" resolves the error, but creates the .chm file in another location, which I do not prefer.
navigating to the 8DOT3 name of the ".conan" folder, which is "CONAN~1", to run the hhc.exe command, succeeds, but unfortunately I have no way of getting conan to use this 8DOT3 path for creating the package. E.g. C:\Users\xxxxxxx\CONAN~1\...
I can live with the using the %TMP% folder but would prefer generating the .chm in the current folder. Anyone have any ideas?
HTML Help Workshop v1.31 is installed on my machine at C:\Program Files (x86)\HTML Help Workshop, probably from a Visual Studio installation (not sure). I attempted using a version downloaded from Microsoft website (v1.30) as well, which made no difference.
Other info: Conan version 1.18.0, Doxygen version 1.8.14, Windows 10 Version 1809
Unfortunately not a solution, but this is a known limitation in the hhc.exe, see: https://social.msdn.microsoft.com/Forums/en-US/0681145c-223b-498c-b7bf-be83209cbf4e/issue-with-html-workshop-in-a-windows-container?forum=visualstudiogeneral
HTML Help 1.x command line compiler hhc.exe cannot compile CHM file to folder whose full path contains folder name starting with dot. If you have that problem, you probably specified output path with folder starting with dot, e.g. "d:\My files.NET\documentation". You can use dots in folder names but not at the beginning.
Edit 2019-11-15:
I've just pushed a proposed patch to github (pull request 7402, https://github.com/doxygen/doxygen/pull/7402).
This proposed patch changes inside doxygen from the current directory to the short named current directory, but just for the HTML Help compilation.
Edit 2019-11-16:
Code has been integrated in the master version on github.
This is not an answer either. Actually, you found the answer and workaround[s] yourself.
Use OUTPUT_DIRECTORY to specify a directory containing no folder names beginning with periods.
The error you described is a known issue of the MS HTML Help compiler. More general, the HTML Help compiler does not like some folder and file names. Try and stick with these characters _, a..z, A..Z, 0..9. Do not use these signs in particular ., -, # .
Please note that the proprietary CHM file format is about 20 years old (Windows 95, ...). HTML Help is in maintenance mode, which means no new features and bug fixes are expected for either the runtime or the compiler. All mainstream development on HH has stopped.
There is no way to avoid this error if a directory name above begins with a period. Not even if only the necessary files are written by Doxygen and compiling of the index.hhp is done by a third-party tool like FAR HTML using your path that contains .conan. This is because all applications are using the faulty HHA.dll.
The above applies of course to the entire workflow you have described. Maybe you can interrupt it.
Doxygen can be configured not to call the HTMLHelp compiler. Just uncheck the GENERATE_HTMLHELP option (DoxyWizard: Experts > Topics > HTML). You have all files generated by Doxygen in your preferred output directory - but of course without the CHM file. This can be imported later e.g. by HelpNDoc and compiled as a CHM file in another location.
If you can interrupt the workflow and can also make changes to Doxygen's settings, then a preference setting of OUTPUT_DIRECTORY to e.g. C:/CacheMenu/CONAN~1/DOXYGE~1 also works as expected (here used as test case).
No matter what you do, your workaround and copy and paste from another directory outside is a quick solution at this stage. Please note the EDIT in #albert's answer.

Undefined function or variable 'skript_name' Matlab

I'm using an open source code from Matlab: http://makerzone.mathworks.com/uncategorized/activity-detection-with-matlab/
for activity detection. All data that I need is in the zip file that you can download above. When I try to run the main script activityDetection.m that classificate the data it shows this error: Undefined function or variable 'activityDetection'.
maybe knows someone how to fix it :)
I downloaded zip file and then run it on my laptop. It works just fine.
You need to change your working directory to the directory where the code is (or add the directory to your MATLAB path by typing addpath('ADRESS TO DIRECTORY')).

Fatal Error: "MATLAB_PREFDIR must be an absolute path. Cannot set preferences directory to the relative path.." occurs when spmd is used

I am running a program on Matlab and I use spmd to parallelize my code.
The same code runs on 2 different PCs. One of them runs perfectly well, but the other doesn't and the Fatal Error occurs.
If I try to run a non-parallelized program, there are no errors. I don't know if there is a problem with this specific command or if I did something wrong myself.
Could it be related to the directories in which I have saved my code files?
If so then why does the non-parallelized program run?
I'm not sure if you still have this problem, but anyway...
The problem is with the path to preferences folder. So, you need to change it.
Mostly such error occurs if you don't have write access to this folder or its located in hidden folder.
To open the current path of the prefdir type winopen(prefdir) in matlab Command window. Then copy all files from this folder into new one (for instance C:\MATLABPreferences).
Now you need to change a path of the prefdif using .bat file with the following text:
fullfile (matlabroot, 'bin', 'matlab')
set MATLAB_PREFDIR=<New preference folder location>
"<MATLAB executable location>"
Example:
fullfile (matlabroot, 'bin', 'matlab')
set MATLAB_PREFDIR=C:\MATLABPreferences
"C:\Program Files\MATLAB\R2013b\bin\matlab.exe"
Run it and enjoy parallel computing with matlab.
More detailed explanation you can find here.
I've had problems with this, and so far the internet was not really useful. After hours of Googling, this turned out to be useful. You just need to add a new variable to your environmental variables (in case you are using Windows) named MATLAB_PREFDIR with the location of the preferred directory.
For me, it is C:\Users\Balázs\AppData\Roaming\MathWorks\MATLAB\R2014a, but you can get if you type prefdir into matlab's command line.

error message : file does not exist at path 'file://localhost/volumes/tablecellview.xib'

I've made the transfer of my application from one mac to another, and when I tried to build it, the following error message appears : file does not exist at path 'file://localhost/volumes/tablecellview.xib'
So I don't know how how to deal with that !
right-click on the file in your project view and check to what path it points. If necessary you can adjust it there