Less Compiling Doesn't work for me in Netbeans 8.1 beta - netbeans

I want to start using the option to compile my less files from within an html5 project in netbeans 8.1 (Windows 7). However it doesn't work for me.
1 . I npm installed less from the command line with -g option flag.
I opened up the tools...options...html/js menu and placed the path in the less path input box. I hit apply and then ok.
I made a change to my less file and hit the run button and it shows that it compiled in the output dialog box.
Message shown:
"C:\Users\Larry\AppData\Roaming\npm\lessc.cmd" "--source-map"
"--source-map-rootpath=../less" "--source-map-url=style.css.map"
"C:\Users\Larry\Desktop\interface\public_html\less\style.less"
"C:\Users\Larry\Desktop\interface\public_html\css\style.css" Done.
I have tried exiting netbeans and then loading it back up but it will still not work. I have even tried loading a new project with a different less file and it still doesn't work.
I would appreciate any suggestions.

It must have been something with the beta release of Netbeans 8.1. I downloaded and installed the production release of Netbeans 8.1. I then had to re add the path to the lessc.cmd file as described in step 2 of my question(step below).
I opened up the tools...options...html/js menu and placed the path in
the less path input box. I hit apply and then ok.
I then placed my less file with the same name as my css file in a folder named less in the root directory of my project. Now when I save or run my project the changes are reflected in my css file.
Note: Make sure you have a folder named css and less in your projects root directory and place the respective css and less files with the same name in the appropriate folders.
Example:
MyProject(root directory folder)
| |
less(Folder) css(Folder)
| |
style.less style.css

Related

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.

Change .vscode folder location

I'm programming a client side applications using SharePoint Designer 2013.
I want to change to VSCODE since it supports a lot of extensions for some Javascript library like angular, jQuery. And because of the Chrome/Node.js debugger extension.
But when I try to start any Debugger, I got the error:
Unable to create 'launch.json' file inside the '.vscode' folder (Error: UNKNOWN: unknown error, mkdir '\\servername\DavWWWRoot\sitename\Style Library\.vscode').
I get this error because it's impossible to create a folder in SharePoint where the name starts with dot.
So there's a possibility to change the name of this folder or the file location to any directory in my local computer?
No, it's not possible to move/rename that folder. VS code is a tool that bases project management on folder content. So it is essential that the project settings reside in the folder being managed.
You can move the "extensions" folder, but unfortunately not the argv.json (so the ".vscode" will, at least be recreated on vscode launch)
https://github.com/microsoft/vscode/issues/17691#issuecomment-559234574
I hope that'll finally change sometime .
https://github.com/microsoft/vscode/issues/3884
https://github.com/OmniSharp/omnisharp-roslyn/issues/953

Run node-webkit project in Netbeans 7.4

I am trying to configure Netbeans IDE 7.4 for node-webkit development.
It is excellent IDE but I want to run my projects with F6 button. To do this I added NW.EXE as additional browser (executable is located outside project folder).
After this I have a problem with execution arguments. NW.EXE expects a folder path to be specified as an argument, but I cannot leave empty field of Start File in project settings and the Project URL has to start with either http:// or file:// while Node-webkit needs a path like C:/path_to_app
Does any method exist to deal with this feature?
In short, you can work this around by creating a batch program and let it strip the file name down to the path name part, to be fed to nw.exe, as it requires.
Unfortunately, as you said, we don't have full control over the way the main file of the project is passed to the browser, hence some further actions (in addition to the creation of the batch file) are needed.
This is how I got it working after a bit of struggle:
added nw.exe to the system %PATH% variable (optional, just for ease of access)
created nw.bat in the same folder as nw.exe, and filled it with this content:
#echo %1
start nw.exe %~d1%~p1
The first line of this batch file is just to inspect the actual parameter that is getting passed to the batch file.
The second line uses start to invoke nw.exe without having to wait for its return (you may need to specify the full path to nw.exe, if you didn't add it to the system %PATH% variable).
The second line also passes to nw.exe the drive part of the parameter (extracted from %1 by %~d1) concatenating it to the path of the parameter (extracted from %1 by %~p1).
For instance, my last run from within NetBeans gave this output:
D:\node\test\index.html
D:\node\test>start nw.exe D:\node\test\
Then I needed something to tie the NetBeans run button to an arbitrary executable, and luckily I found a perfect fit.
So here is how I went on:
installed the Node.js Projects plugin from Timboudreau Update Center
went to Options > Miscellaneous > Node.js and set the Node.js Binary field to point to my nw.bat file
In my project, I've also taken care to put package.json in the same folder of index.html (being that that's the main file of my package, and that's what will be fed to the batch file).
Now pressing F6 on my NetBeans installation happily runs my node-webkit project without any further ado :-)

Eclipse Erlide how to choose default current directory

I have installed Erlide in Eclipse, and trying to create an application. The Erlang project is named demo. It contains three folders - ebin, include and src. The demo.erl file is in src, for simply printing Hello World.
To run it in Eclipse shell, I choose Run from the top menu, and click Run as Erlang Application. Then a console opens in the sidebar. There I type c(demo) and press CTRL-Enter. Then I get an error message like demo.erl:none: no such file or directory.
Then I do pwd(), and it shows C:/Users/myName/Desktop/eclipse-jee-juno-SR1-win32-x86_64/eclipse even though the Erlang project is in workspace C:/Users/myName/Desktop/workspace/Erlang. Is there any way make Erlide run all Erlang applications from their directory directly?
If you have set Project -> Build Automatically in Eclipse to true, you don't need to type c(demo). explicitly to compile the demo module, it's done automatically when you save your file. But if you have not set it, you'll get exception error: undefined function if you try to use some of the functions in the module for example.
To make the c(demo) command work properly and find your .erl files, there are several ways to set the current working directory:
Use Run -> Run Configuration -> Erlang Application -> Runtimes -> Working directory -> enter the full path to the /src folder of your project (without quotes).
Then hit Apply and restart Eclipse (File -> Restart). If you try to Run the project without first restarting the IDE, your changes will not take effect i.e. the pwd(). command will still be returning the old working directory path.
You can set the working directory in the erlide console with the command c:cd(the/full/path/to/your/src/folder)., before the call to c(demo). The path should be put in quotes.
You can also set the working directory in the .erlang file by typing there the same command c:cd(the/full/path/to/your/src/folder). (the path again should be put in quotes). The file must be placed in you user directory, for Windows this would be C:/Documents and Settings/YourUsername. It's the same directory were also .erlang.cookie and erlide-debug.txt are placed. Windows Explorer will not allow you to create a file named .erlang, so you have to use the command copy NUL .erlang in Command Prompt (cmd.exe) for this. Then you can edit it with any txt redactor. Don't forget to restart Eclipse again after it.
Also note the following:
You can use only / and not \ in the path (even in Windows).
If you have entered a wrong path (with \ or to a non existing directory), it will be ignored and the working directory will not be changed at all.
After changing the working directory to your/src folder, your beam files will start to appear there too instead of the /ebin folder.
If you set a different path in both .erlang file and Run -> Run Configuration -> Erlang Application -> Runtimes -> Working directory, pwd(). will return the path in .erlang file.
You don't need to run c(demo). The beam code is loaded and reloaded automatically, whenever the source is changed and saved.
If you still need to set a working directory, go to run->run configuration and you can edit the configuration.
/Vlad

$_SERVER['ZEND_PHPUNIT_TESTS_LOCATION'] not set correctly in Zend Studio

I set up unit testing in Zend Studio last week, and it was working fine.. until suddenly after some refactoring, I got an error that the following file was not found in ZendPHPUnit.php:
/var/folders/Td/Tdnh++2KEdWAsk8Y0O4N0k+++TI/-Tmp-/zend.phpunit.UserMapperTest.php.2428213892936827201.php
The file path is stored in $_SERVER['ZEND_PHPUNIT_TESTS_LOCATION'] in ZendPHPUnit.php
I checked the folder and I found
zend.phpunit.UserrMapperTest.php.6031927106542896607.php (the number is different)
I was a little desperate so I made it work by forcing
$_SERVER['ZEND_PHPUNIT_TESTS_LOCATION'] = '/var/folders/Td/Tdnh++2KEdWAsk8Y0O4N0k+++TI/-Tmp-/zend.phpunit.UserMapperTest.php.6031927106542896607.php';
Eventually, after I worked with a few other test cases, the problem fixed itself. Now, I refactored some code again, and the problem is back. None of my testcases work.
Restarting the comp doesnt help, Project -> Clean doesnt help. I am on a mac running Snow Leopard.
Any insights on what is causing this?
Thanks!
The problem is that PHPUnit doesn't work with the files themselves but with copies of the files that it creates on the fly and stores on directories that are also created on the fly. These files are modified to include PHPUnit logic. This goes for the test files themselves as well as for the php.ini (which forces you to load extensions in the main php.ini file for the tests, since additional .ini files are ignored). Every time you run the tests these files will be re-created with a new unique name (original name plus unique identifier).
The best way that I've found to work around this issue is to create launch configurations for the tests and save them as .launch files in your project (right click -> run as -> create new PHPUnit config -> select "shared file" in the common tab). Once you have the launch configs you can just run this by opening on the editor and clicking the Run button. You will see that after every time you run them there will be a line like the following on each launch file that has changed (easy to see if the configs are in version control):
<mapEntry key="ZEND_PHPUNIT_TESTS_LOCATION" value="/var/folders/my/ph9spb0s45z5_11l9tqw256r0000gn/T/DefaultWorkspace.phpunit.AssignmentRequestControllerDateCriteriaTest.php.4951739174960507380.php"/>
I usually just commit this change together with whatever other changes I've been working on at that time.
It's still kind of annoying that the file changes and thus the launch config, but at least in this way your tests will always run and you don't have to worry about having to re-run the manually, or clean the project, or anything like that.